how to swap two numbers with out using temp variable
Answer Posted / guest
another way is using bitwise XOR (^).
a=9; //a=1001
b=5; //b=0101
a=a^b; //a=1100
b=a^b; //b=1001
a=b^a; //a=0101
Is This Answer Correct ? | 29 Yes | 6 No |
Post New Answer View All Answers
Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be
write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;
What is virtual destructor? What is its use?
How important is c++?
What is the best it certification?
Explain the difference between abstract class and interface in c++?
Show the application of a dynamic array with the help of an example.
Is c++ harder than java?
What is c++ & why it is used?
What is & in c++ function?
What is the difference between a "copy constructor" and an "assignment operator" in C++?
Explain polymorphism?
What does floor mean in c++?
What is implicit conversion/coercion in c++?
Name the debugging methods that are used to solve problems?