diff options
Diffstat (limited to 'examples/hello_sizeof/sizeof_test.c')
-rw-r--r-- | examples/hello_sizeof/sizeof_test.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/hello_sizeof/sizeof_test.c b/examples/hello_sizeof/sizeof_test.c new file mode 100644 index 0000000..87a445c --- /dev/null +++ b/examples/hello_sizeof/sizeof_test.c @@ -0,0 +1,20 @@ +#include <stdio.h> + +int main (int argc, char **argv) +{ + printf ("sizeof(int)=%i\n", SIZEOF_INT); + printf ("sizeof(long)=%i\n", SIZEOF_LONG); +#ifdef SIZEOF_LONG_LONG + printf ("sizeof(long long)=%i\n", SIZEOF_LONG_LONG); +#else + printf ("long long type is absent\n"); +#endif +#ifdef SIZEOF_SIZE_T_STRING_H + printf ("sizeof(size_t)=%i\n", SIZEOF_SIZE_T_STRING_H); +#else + printf ("size_t type is absent???\n"); +#endif + printf ("sizeof(void*)=%i\n", SIZEOF_VOIDP); + + return 0; +} |