#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);
swap2(x,y);
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
what are the outputs?
Answer Posted / mannucse
10 5
5 10
Is This Answer Correct ? | 9 Yes | 10 No |
Post New Answer View All Answers
What is the use of printf() and scanf() functions?
What is the difference between text and binary i/o?
Can two or more operators such as and be combined in a single line of program code?
Tell me when is a void pointer used?
If fflush wont work, what can I use to flush input?
What is a memory leak? How to avoid it?
What are logical errors and how does it differ from syntax errors?
What is the modulus operator?
What does a pointer variable always consist of?
Is it possible to execute code even after the program exits the main() function?
Write a program to print factorial of given number using recursion?
What is graph in c?
What is an endless loop?
What is type qualifiers?
Is c pass by value or reference?