write a program in C to swap two variables
Answer Posted / srinivas
#include <stdio.h>
int main(void)
{
int a = 2, b = 5;
a = a + b;
b = a - b;
a = a - b;
printf("%d\t%d\n", a, b);
return 0;
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is ponter?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
How do I get an accurate error status return from system on ms-dos?
Why doesnt that code work?
How many types of operator or there in c?
What is hungarian notation? Is it worthwhile?
What is mean by data types in c?
Stimulate calculator using Switch-case-default statement for two numbers
What are header files in c programming?
application attempts to perform an operation?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
Explain what does the format %10.2 mean when included in a printf statement?
What is the purpose of macro in C language?
What is dynamic dispatch in c++?
What is scope rule in c?