Search This Blog

Tuesday, April 21, 2015

C Program to interchange the value of two variables without using third variable

C Program to interchange the value of two variables without using third variable. C Programming. Interchanging Variables.

#include <stdio.h>
void main()
{
 int a,b;
 a=20, b=30;
 b=a+b;
 a=b-a;
 b=b-a;
 printf("a=%d  b=%d", a,b);
}

No comments:

Post a Comment