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
What is boyce codd normal form in c++?
How to defines the function in c++?
What is an html tag?
What parameter does the constructor to an ofstream object take?
Who invented turbo c++?
What is the latest c++ version?
Does c++ have a hash table?
What is the rule of three?
What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?
Does c++ cost money?
how to access grid view row?
How do you flush a buffer in c++?
What would happen on forgetting [], while deallocating an array through new?
What do you understand by a pure virtual member function?
How are the features of c++ different from c?