The following code swaps values between 2 variables without using a temp variable.....
i want to know the logic behind this
//#include "stdafx.h"
#include<stdio.h>
int main(){
int a =3, b=5;
a^=b^=a^=b;
printf("%d" "\n" "%d",a,b);
return 0;
}
Output
5
3