Skip to content

Commit

Permalink
Dumping limits.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mblair committed Sep 21, 2010
1 parent c73b040 commit a960461
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions limits.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// My UINT_MAX & ULONG_MAX are -1.
// Surely they're not infinite.
// This is with both GCC and Clang.
// Not sure what's going on here.

#include <stdio.h>
#include <limits.h>

int main() {
printf("INT_MAX = %d\n", INT_MAX);
printf("INT_MIN = %d\n", INT_MIN);
printf("SHRT_MAX = %d\n", SHRT_MAX);
printf("SHRT_MIN = %d\n", SHRT_MIN);
printf("LONG_MAX = %ld\n", LONG_MAX);
printf("LONG_MIN = %ld\n", LONG_MIN);
printf("USHRT_MAX = %d\n", USHRT_MAX);
printf("UINT_MAX = %d\n", UINT_MAX);
printf("ULONG_MAX = %ld\n", ULONG_MAX);

return 0;
}

0 comments on commit a960461

Please sign in to comment.