int main()
{
int a=10,b=20;
printf("values of a before swap ="%d,a);
printf("values of b before swap ="%d,b);
a=a+b;
b=a-b;
a=a-b;
printf("******************");
printf("values of a after swap ="%d,a);
printf("values of b after swap ="%d,b);
return 0;
}
output:
values of a before swap =10
values of b before swap =20
values of a after swap =20
values of b after swap =10