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 the difference between struct and typedef struct in c?
Why functions are used in c?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
Is null a keyword in c?
What is the use of putchar function?
Explain the difference between malloc() and calloc() function?
How can you determine the size of an allocated portion of memory?
How to compare array with pointer in c?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is scanf_s in c?
Write a code to generate a series where the next element is the sum of last k terms.
hi send me sample aptitude papers of cts?
What math functions are available for integers? For floating point?
What is structure of c program?
Which header file is essential for using strcmp function?