3 static void show_size(const char *msg
, int size
)
5 printf("%-15s: %d bytes (%2d bits)\n", msg
, size
, size
* 8);
10 show_size("char", sizeof(char));
11 show_size("int", sizeof(int));
12 show_size("short int", sizeof(short int));
13 show_size("long int", sizeof(long int));
14 show_size("long long", sizeof(long long));
15 show_size("unsigned int", sizeof(unsigned int));
16 show_size("signed int", sizeof(signed int));
17 show_size("unsigned char", sizeof(unsigned char));
18 show_size("signed char", sizeof(signed char));
19 show_size("unsigned long *", sizeof(unsigned long *));