what is the purpose of the following code, and is there any
problem with the code?
void fn(long* p1, long* p2)
{ register int x = *p1;
register int y = *p2;
x ^= y;
y ^= x;
x ^= y;
*p1 = x;
*p2 = y;
}
Answer Posted / senthil
exchanges "long data type" values referenced by pointers p1 and p2
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
Explain the advantages of using macro in c language?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
Explain the difference between call by value and call by reference in c language?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
Explain what is the concatenation operator?
Explain how does free() know explain how much memory to release?
What is the purpose of scanf() and printf() functions?
what is the difference between 123 and 0123 in c?
How is a pointer variable declared?
Explain what are reserved words?
Is c easier than java?
What are register variables? What are the advantage of using register variables?
Explain how can I right-justify a string?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above