devxlogo

Swap Two Integer Variables

Swap Two Integer Variables

Use this algorithm to swap two integer variables:

 a = a Xor b b = a Xor b a = a Xor b 

devx-admin

Share the Post: