Skip to content

Instantly share code, notes, and snippets.

@nesffer
Created June 21, 2018 15:06
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 nesffer/b063a70efcd182a4dbf1f674ddb8c2fe to your computer and use it in GitHub Desktop.
Save nesffer/b063a70efcd182a4dbf1f674ddb8c2fe to your computer and use it in GitHub Desktop.
int a = 10;
int b = 20;
printf("XOR 전: %d, %d\n", a, b); // XOR 전: 10, 20
a ^= (b ^= (a ^= b));
printf("XOR 후: %d, %d\n", a, b); // XOR 후: 20, 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment