#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 enumerated data type in c?
Is r written in c?
How can I get random integers in a certain range?
What is the best style for code layout in c?
What is advantage of pointer in c?
Are enumerations really portable?
Is register a keyword in c?
What is a memory leak? How to avoid it?
Write a C program in Fibonacci series.
What are the different types of errors?
What is dangling pointer in c?
Where are some collections of useful code fragments and examples?
How can I remove the leading spaces from a string?
Difference between constant pointer and pointer to a constant.
Is a house a mass structure?