Wednesday, 28 June 2017

Swap the variable without tmp variable

swap(int *a, int *b) {
    *a ^= *b ^= *a ^= *b; 


Another Method
a=a+b;
 b=a-b; 
a=a-b;  


No comments:

Post a Comment