Want to swap two numbers without the use of the third variable? Copy the below c program and execute it to see the real time output.
int a=1, b=8;
printf("Before swapping a=%d b=%d",a,b);a=a+b;//a=30
printf("After swapping a=%d b=%d",a,b);
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.