Skip to content

Instantly share code, notes, and snippets.

@fclairamb
Created September 10, 2013 00:49
Show Gist options
  • Save fclairamb/6503575 to your computer and use it in GitHub Desktop.
Save fclairamb/6503575 to your computer and use it in GitHub Desktop.
#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