21 lines
554 B
C
21 lines
554 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
printf("int: %zu bytes\n", sizeof(int));
|
|
printf("short: %zu bytes\n", sizeof(short));
|
|
printf("long: %zu bytes\n", sizeof(long));
|
|
printf("long long: %zu bytes\n", sizeof(long long));
|
|
|
|
printf("float: %zu bytes\n", sizeof(float));
|
|
printf("double: %zu bytes\n", sizeof(double));
|
|
printf("long double: %zu bytes\n", sizeof(long double));
|
|
|
|
printf("char: %zu bytes\n", sizeof(char));
|
|
|
|
char ch = 'A';
|
|
printf("\n%c %d", ch, ch);
|
|
ch += 32;
|
|
printf("\n%c %d", ch, ch);
|
|
|
|
return 0;
|
|
}
|