Skip to content

Instantly share code, notes, and snippets.

@rpj
Created March 13, 2009 02:01
Show Gist options
  • Save rpj/78392 to your computer and use it in GitHub Desktop.
Save rpj/78392 to your computer and use it in GitHub Desktop.
void swap(int* a, int* b) {
*a = (*b = ((*a = *a ^ *b) ^ *b) ^ *a);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment