write a program to swap Two numbers without using temp variable.
Answer Posted / sur!
void xorSwap (int *x, int *y) {
if (x != y) {
*x ^= *y;
*y ^= *x;
*x ^= *y;
}
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is double pointer in c?
What are the types of data structures in c?
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
Why is c not oop?
Why do we use namespace feature?
write a program to find the given number is prime or not
Explain how do you view the path?
What are Macros? What are its advantages and disadvantages?
Explain what is the best way to comment out a section of code that contains comments?
What is the purpose of void in c?
What is an auto variable in c?
Are bit fields portable?
What is a stream?
What do you mean by scope of a variable in c?
What is function and its example?