The following program to swap Two numbers without using temp variable
int main()
{
int a=10,b=20;
printf("before swapping a=%d...b=%d",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("after swapping a=%d...b=%d",a,b);
return 0;
}

Like it on Facebook, Tweet it or share this article on other bookmarking websites.

No comments