#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 enumerated data type in c?

613


Is r written in c?

716


How can I get random integers in a certain range?

604


What is the best style for code layout in c?

622


What is advantage of pointer in c?

680






Are enumerations really portable?

585


Is register a keyword in c?

622


What is a memory leak? How to avoid it?

557


Write a C program in Fibonacci series.

622


What are the different types of errors?

631


What is dangling pointer in c?

611


Where are some collections of useful code fragments and examples?

701


How can I remove the leading spaces from a string?

623


Difference between constant pointer and pointer to a constant.

601


Is a house a mass structure?

633