Skip to content

Instantly share code, notes, and snippets.

@sixtyfive
Last active June 18, 2020 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sixtyfive/e0798494c8b311294cd17468a33f0802 to your computer and use it in GitHub Desktop.
Save sixtyfive/e0798494c8b311294cd17468a33f0802 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(void) {
unsigned int a = 5;
a -= (unsigned)10;
printf("%i\n", a); // -5 with amd64/gcc, but only by coincidence (undefined!)
printf("%u\n", a); // some really high number; UINTMAX - 5...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment