Introduce emu8086
[lcapit-junk-code.git] / type-sizes.c
blob3d43c1f5ca75f8137557266a1a6b020ab5ca4edc
1 #include <stdio.h>
3 static void show_size(const char *msg, int size)
5 printf("%-15s: %d bytes (%2d bits)\n", msg, size, size * 8);
8 int main(void)
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 *));
21 return 0;