Skip to content

Instantly share code, notes, and snippets.

@a46554
Created September 13, 2017 06:58
Show Gist options
  • Save a46554/87257463a0d9903f3bc1c5b1b7c64b86 to your computer and use it in GitHub Desktop.
Save a46554/87257463a0d9903f3bc1c5b1b7c64b86 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int a = 1, b = 2;
printf("a = %d, b= %d\r\n", a, b);
a = a ^ b;
b = b ^ a;
a = a ^ b;
printf("a = %d, b= %d\r\n", a, b);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment