Swap

This algorithm exchanges the value of two variables.



									void Swap(int* a, int* b) {
	*a ^= *b;
	*b ^= *a;
	*a ^= *b;
}
								


Example

									int a = 1025;
int b = -5579;
Swap(&a, &b);
								


Output

									a: -5579
b: 1025