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
Which function in C can be used to append a string to another string?
What does int main () mean?
What is the purpose of scanf() and printf() functions?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
Which is more efficient, a switch statement or an if else chain?
How can I implement a delay, or time a users response, with sub-second resolution?
define string ?
What is uint8 in c?
When is a null pointer used?
What are the types of unary operators?
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
Does c have function or method?
how to capitalise first letter of each word in a given string?
How do you list a file’s date and time?
What is the difference between declaring a variable by constant keyword and #define ing that variable?