Skip to content

Instantly share code, notes, and snippets.

@oliverbooth
Created October 19, 2014 14:50
Show Gist options
  • Select an option

  • Save oliverbooth/5fc63f26864eab27aadb to your computer and use it in GitHub Desktop.

Select an option

Save oliverbooth/5fc63f26864eab27aadb to your computer and use it in GitHub Desktop.
Integer swap in C
#define SWAP(x,y) do{ x^=y; y^=x; x^=y; } while (0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment