C Programming - Vintage XOR Swap

#define SWAP(a, b) (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))

Will that work in case of SWAP(a[i], a[j]) when i == j ?

Labels:


About this entry