Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void)
- {
- int answer;
- short x = 1;
- long y = 2;
- float u = 3.0;
- double v = 4.4;
- long double w = 5.54;
- char c = 'p';;
- printf("Date : %s\n", __DATE__);
- printf("Time : %s\n", __TIME__);
- printf("File : %s\n", __FILE__);
- printf("Line : %d\n", __LINE__);
- printf("\nEnter 1 or 0 : ");
- scanf("%d", &answer);
- printf("%s\n", answer?"\nYou said YES\n":"\nYou said NO\n");
- printf("The size of int %d\n", sizeof(answer));
- printf("The size of short %d\n", sizeof(x));
- printf("The size of long %d\n", sizeof(y));
- printf("The size of float %d\n", sizeof(u));
- printf("The size of double %d\n", sizeof(v));
- printf("The size of long double %d\n", sizeof(w));
- printf("The size of char %d\n", sizeof(c));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement