Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created September 18, 2013 11:43
Show Gist options
  • Select an option

  • Save KristianLyng/6607977 to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/6607977 to your computer and use it in GitHub Desktop.
test=2;
printf("%s\n", test == 2 ? "TRUE" : "FALSE");
printf("%s\n", !test == !2 ? "TRUE" : "FALSE");
Output:
~$ gcc foo.c
~$ ./a.out
FALSE
TRUE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment