Qualcomm Interview Question

What is the "fastest" way to swap two integer values?

Interview Answer

Anonymous

Sep 11, 2015

int a = 1; int b = 2; swap operation; a ^= b; b ^= a; a ^= b;

1