Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created August 24, 2016 12:07
Show Gist options
  • Save KristianLyng/ac07d8e6c2fcd82491db2a851be26b41 to your computer and use it in GitHub Desktop.
Save KristianLyng/ac07d8e6c2fcd82491db2a851be26b41 to your computer and use it in GitHub Desktop.
kly@leia:~$ cat foo.c
#include <stdio.h>
#include <limits.h>
int main(void) {
int i = INT_MAX;
int j = i + 1;
printf ("%d vs %d (%s)\n",i,j, (i==j) ? "match" : "no match");
return 0;
}
kly@leia:~$ gcc -Wall -g foo.c
kly@leia:~$ ./a.out
2147483647 vs -2147483648 (no match)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment