#include <stdio.h>
#define SWAP1(x,y) (x = x ^ y , y = x ^ y , x = x ^ y )
#define SWAP2(x,y) (x^=y^=x^=y)
#define SWAP3(x,y) (x^=y^=x^=y^=x^=y^=x^=y^=x^=y)
int main(void) {
int a = 5, b=-30;
printf("Original a=%d, b=%d\n",a
,b
); SWAP1(a,b);
printf("SWAP1 -> a=%d, b=%d\n",a
,b
); SWAP2(a,b);
printf("SWAP2 -> a=%d, b=%d\n",a
,b
); SWAP3(a,b);
printf("SWAP3 -> a=%d, b=%d\n",a
,b
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgojZGVmaW5lIFNXQVAxKHgseSkgKHggPSB4IF4geSAsICB5ID0geCBeIHkgLCAgeCA9IHggXiB5ICkKI2RlZmluZSBTV0FQMih4LHkpICh4Xj15Xj14Xj15KQojZGVmaW5lIFNXQVAzKHgseSkgKHhePXlePXhePXlePXhePXlePXhePXlePXhePXkpCgoKaW50IG1haW4odm9pZCkgewoJCglpbnQgYSA9IDUsIGI9LTMwOwoJcHJpbnRmKCJPcmlnaW5hbCBhPSVkLCBiPSVkXG4iLGEsYik7CglTV0FQMShhLGIpOwoJcHJpbnRmKCJTV0FQMSAtPiBhPSVkLCBiPSVkXG4iLGEsYik7CglTV0FQMihhLGIpOwoJcHJpbnRmKCJTV0FQMiAtPiBhPSVkLCBiPSVkXG4iLGEsYik7CglTV0FQMyhhLGIpOwoJcHJpbnRmKCJTV0FQMyAtPiBhPSVkLCBiPSVkXG4iLGEsYik7CglyZXR1cm4gMDsKfQo=