#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 / goodhunter
10 5
10 5
Is This Answer Correct ? | 20 Yes | 2 No |
Post New Answer View All Answers
Is c still used?
I need previous papers of CSC.......plz help out by posting them.......
What is the use of a static variable in c?
Explain the use of 'auto' keyword
Can we assign string to char pointer?
Explain the difference between strcpy() and memcpy() function?
How do you list a file’s date and time?
How would you obtain the current time and difference between two times?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
What are called c variables?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
What are the uses of null pointers?
What are 'near' and 'far' pointers?
Explain function?
Difference between MAC vs. IP Addressing