Skip to content

Instantly share code, notes, and snippets.

@nesffer
Last active June 21, 2018 15:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
int a = 10;
int b = 20;
printf("XOR 전: %d, %d\n", a, b); // XOR 전: 10, 20
a = a ^ b;
b = a ^ b;
a = 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