Sunday, 13 August 2017

Swapping of two number in C in one line statement

#include"stdio.h"
main()
{
int x=10,y=20;
printf("%d %d",x,y);
x^=y^=x^=y;
printf("%d %d",x,y);
}

No comments:

Post a Comment