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 are pointers? What are different types of pointers?
Why c language is called c?
Why is c so important?
What is pointers in c?
What is a scope resolution operator in c?
What are the types of pointers in c?
List some of the dynamic data structures in C?
Do you know the difference between exit() and _exit() function in c?
What is a void pointer in c?
What are the advantages of external class?
What is the purpose of scanf() and printf() functions?
What does %d do in c?
what is a constant pointer in C
What is the difference between c &c++?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0