box-o-sand/ex21.c
2012-02-11 14:39:50 -05:00

125 lines
4.7 KiB
C

#include <stdint.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("sizeof(int8_t) = %ld\n", sizeof(int8_t));
printf("sizeof(uint8_t) = %ld\n", sizeof(uint8_t));
printf("sizeof(int16_t) = %ld\n", sizeof(int16_t));
printf("sizeof(uint16_t) = %ld\n", sizeof(uint16_t));
printf("sizeof(int32_t) = %ld\n", sizeof(int32_t));
printf("sizeof(uint32_t) = %ld\n", sizeof(uint32_t));
#if defined(_M_X64) || defined(__amd64__)
printf("sizeof(int64_t) = %ld\n", sizeof(int64_t));
printf("sizeof(uint64_t) = %ld\n", sizeof(uint64_t));
#endif
printf("INT8_MAX = %d\n", INT8_MAX);
printf("INT16_MAX = %d\n", INT16_MAX);
printf("INT32_MAX = %d\n", INT32_MAX);
#if defined(_M_X64) || defined(__amd64__)
printf("INT64_MAX = %ld\n", INT64_MAX);
#endif
printf("INT8_MIN = %d\n", INT8_MIN);
printf("INT16_MIN = %d\n", INT16_MIN);
printf("INT32_MIN = %d\n", INT32_MIN);
#if defined(_M_X64) || defined(__amd64__)
printf("INT64_MIN = %ld\n", INT64_MIN);
#endif
printf("sizeof(int_least8_t) = %ld\n", sizeof(int_least8_t));
printf("sizeof(int_least16_t) = %ld\n", sizeof(int_least16_t));
printf("sizeof(int_least32_t) = %ld\n", sizeof(int_least32_t));
#if defined(_M_X64) || defined(__amd64__)
printf("sizeof(int_least64_t) = %ld\n", sizeof(int_least64_t));
#endif
printf("sizeof(uint_least8_t) = %ld\n", sizeof(uint_least8_t));
printf("sizeof(uint_least16_t) = %ld\n", sizeof(uint_least16_t));
printf("sizeof(uint_least32_t) = %ld\n", sizeof(uint_least32_t));
#if defined(_M_X64) || defined(__amd64__)
printf("sizeof(uint_least64_t) = %ld\n", sizeof(uint_least64_t));
#endif
printf("INT_LEAST8_MAX = %d\n", INT_LEAST8_MAX);
printf("INT_LEAST16_MAX = %d\n", INT_LEAST16_MAX);
printf("INT_LEAST32_MAX = %d\n", INT_LEAST32_MAX);
#if defined(_M_X64) || defined(__amd64__)
printf("INT_LEAST64_MAX = %ld\n", INT_LEAST64_MAX);
#endif
printf("INT_LEAST8_MIN = %d\n", INT_LEAST8_MIN);
printf("INT_LEAST16_MIN = %d\n", INT_LEAST16_MIN);
printf("INT_LEAST32_MIN = %d\n", INT_LEAST32_MIN);
#if defined(_M_X64) || defined(__amd64__)
printf("INT_LEAST64_MIN = %ld\n", INT_LEAST64_MIN);
#endif
printf("UINT_LEAST8_MAX = %d\n", UINT_LEAST8_MAX);
printf("UINT_LEAST16_MAX = %d\n", UINT_LEAST16_MAX);
printf("UINT_LEAST32_MAX = %d\n", UINT_LEAST32_MAX);
#if defined(_M_X64) || defined(__amd64__)
printf("UINT_LEAST64_MAX = %ld\n", UINT_LEAST64_MAX);
#endif
printf("sizeof(int_fast8_t) = %ld\n", sizeof(int_fast8_t));
printf("sizeof(int_fast16_t) = %ld\n", sizeof(int_fast16_t));
printf("sizeof(int_fast32_t) = %ld\n", sizeof(int_fast32_t));
#if defined(_M_X64) || defined(__amd64__)
printf("sizeof(int_fast64_t) = %ld\n", sizeof(int_fast64_t));
#endif
printf("sizeof(uint_fast8_t) = %ld\n", sizeof(uint_fast8_t));
printf("sizeof(uint_fast16_t) = %ld\n", sizeof(uint_fast16_t));
printf("sizeof(uint_fast32_t) = %ld\n", sizeof(uint_fast32_t));
#if defined(_M_X64) || defined(__amd64__)
printf("sizeof(uint_fast64_t) = %ld\n", sizeof(uint_fast64_t));
#endif
printf("INT_FAST8_MAX = %d\n", INT_FAST8_MAX);
printf("INT_FAST16_MAX = %ld\n", INT_FAST16_MAX);
printf("INT_FAST32_MAX = %ld\n", INT_FAST32_MAX);
#if defined(_M_X64) || defined(__amd64__)
printf("INT_FAST64_MAX = %ld\n", INT_FAST64_MAX);
#endif
printf("INT_FAST8_MAX = %d\n", INT_FAST8_MAX);
printf("INT_FAST16_MAX = %ld\n", INT_FAST16_MAX);
printf("INT_FAST32_MAX = %ld\n", INT_FAST32_MAX);
#if defined(_M_X64) || defined(__amd64__)
printf("INT_FAST64_MAX = %ld\n", INT_FAST64_MAX);
#endif
printf("INT_FAST8_MIN = %d\n", INT_FAST8_MIN);
printf("INT_FAST16_MIN = %ld\n", INT_FAST16_MIN);
printf("INT_FAST32_MIN = %ld\n", INT_FAST32_MIN);
#if defined(_M_X64) || defined(__amd64__)
printf("INT_FAST64_MIN = %ld\n", INT_FAST64_MIN);
#endif
printf("UINT_FAST8_MAX = %d\n", UINT_FAST8_MAX);
printf("UINT_FAST16_MAX = %ld\n", UINT_FAST16_MAX);
printf("UINT_FAST32_MAX = %ld\n", UINT_FAST32_MAX);
#if defined(_M_X64) || defined(__amd64__)
printf("UINT_FAST64_MAX = %ld\n", UINT_FAST64_MAX);
#endif
printf("sizeof(intptr_t) = %ld\n", sizeof(intptr_t));
printf("sizeof(uintptr_t) = %ld\n", sizeof(uintptr_t));
printf("INTPTR_MAX = %ld\n", INTPTR_MAX);
printf("INTPTR_MIN = %ld\n", INTPTR_MIN);
printf("UINTPTR_MAX = %ld\n", UINTPTR_MAX);
printf("sizeof(intmax_t) = %ld\n", sizeof(intmax_t));
printf("sizeof(uintmax_t) = %ld\n", sizeof(uintmax_t));
printf("INTMAX_MAX = %ld\n", INTMAX_MAX);
printf("INTMAX_MIN = %ld\n", INTMAX_MIN);
printf("UINTMAX_MAX = %ld\n", UINTMAX_MAX);
printf("PTRDIFF_MIN = %ld\n", PTRDIFF_MIN);
printf("PTRDIFF_MAX = %ld\n", PTRDIFF_MAX);
printf("SIZE_MAX = %ld\n", SIZE_MAX);
return 0;
}