Created
September 10, 2013 00:49
-
-
Save fclairamb/6503575 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef SHELL | |
gcc $0 && ./a.out | |
gcc -m32 $0 && ./a.out | |
exit 0 | |
#endif | |
#include <stdio.h> | |
void nb1() { | |
char * str = "999999999999"; | |
printf("nb2 = %ld\n", atol(str)); | |
} | |
void nb2() { | |
char * str = "999999999999"; | |
printf("nb3 = %lld\n", atoll(str)); | |
} | |
int main( int argc, char * argv [] ) { | |
printf("LONG_MAX = %ld\n", LONG_MAX ); | |
printf("LONG_LONG_MAX = %ll\n", LONG_LONG_MAX ); | |
nb1(); | |
nb2(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment