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
What is a structure member in c?
Why is python slower than c?
How pointers are declared?
What is keyword in c?
What are the data types present in c?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What are reserved words?
What is structure padding and packing in c?
What is bin sh c?
Explain what does the function toupper() do?
What is the c value paradox and how is it explained?
Explain how can I write functions that take a variable number of arguments?
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
Why do some versions of toupper act strangely if given an upper-case letter?
What is meant by realloc()?