Write a prog. to interchange contents of two variables without using third variable.
C Programming -->
/* PROG. TO INTERCHANGE THE CONTENTS OF TWO VARIABLES
WITHOUT USING THIRD VARIABLE*/
#include<stdio.h>
#include<conio.h>
main()
{
int a,b;
clrscr();
printf("enter two values ");
scanf("%d%d" ,&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("interchanged values are a=%d b=%d",a,b);
getch();
}