write a program to swap Two numbers without using temp variable.
Answer Posted / biren
#include<stdio.h>
void main()
{
int a=2,b=3;
printf("before swap the value is:::");
printf("a=%d\tb=%d",a,b);
b=a+b-(a=b);
printf("after swap the value is:::");
printf("a=%d\tb=%d",a,b);
}
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
Can you explain the four storage classes in C?
Do string constants represent numerical values?
What is the correct declaration of main?
Why do we need a structure?
How can I remove the leading spaces from a string?
Why is c called c not d or e?
What do you understand by friend-functions? How are they used?
Describe explain how arrays can be passed to a user defined function
How do you define structure?
Explain the difference between getch() and getche() in c?
Why is python slower than c?
What do you mean by invalid pointer arithmetic?
How can I get back to the interactive keyboard if stdin is redirected?
What is function pointer c?
How macro execution is faster than function ?