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 build process in c?
How to implement a packet in C
Why do we use header files in c?
In c programming language, how many parameters can be passed to a function ?
c program to compute AREA under integral
Does sprintf put null character?
Why C language is a procedural language?
What is difference between structure and union in c programming?
What are the two types of functions in c?
How can you tell whether a program was compiled using c versus c++?
What is difference between structure and union?
What is an array in c?
Explain what standard functions are available to manipulate strings?
In which layer of the network datastructure format change is done
Is flag a keyword in c?