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
How do you use a 'Local Block'?
Is c call by value?
How can I send mail from within a c program?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
Is multithreading possible in c?
Explain what is the benefit of using enum to declare a constant?
What is indirection?
What is hashing in c?
Why isn't it being handled properly?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Which is better oop or procedural?
Explain the use of keyword 'register' with respect to variables.
what is ur strangth & weekness
Explain how can a program be made to print the line number where an error occurs?
What are the application of void data type in c?