#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 / chitra
10 5
5 5
| Is This Answer Correct ? | 3 Yes | 9 No |
Post New Answer View All Answers
What is d scanf?
Explain why C language is procedural?
What is function in c with example?
ATM machine and railway reservation class/object diagram
What is modeling?
Should I learn c before c++?
Is c++ based on c?
What do you mean by command line argument?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
What are runtime error?
simple program of graphics and their output display
Who is the main contributor in designing the c language after dennis ritchie?
What are the three constants used in c?
List some of the static data structures in C?
Explain what is meant by 'bit masking'?