#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


Please Help Members By Posting Answers For Below Questions

What is the use of printf() and scanf() functions?

638


What is the difference between text and binary i/o?

595


Can two or more operators such as and be combined in a single line of program code?

813


Tell me when is a void pointer used?

650


If fflush wont work, what can I use to flush input?

618






What is a memory leak? How to avoid it?

580


What are logical errors and how does it differ from syntax errors?

663


What is the modulus operator?

740


What does a pointer variable always consist of?

667


Is it possible to execute code even after the program exits the main() function?

822


Write a program to print factorial of given number using recursion?

607


What is graph in c?

587


What is an endless loop?

806


What is type qualifiers?

666


Is c pass by value or reference?

598