how to swap two numbers with out using temp variable

Answer Posted / vaibhav meena

Its simple:
For Integer Values

A^=B^=A

and with arithmetic operators :

All the above answers are right

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?

630


What are pointers used for c++?

568


Can a program run without main in c++?

579


Explain public, protected, private in c++?

563


What is the default access level?

616






What is the full form of ios?

550


What is the difference between the parameter to a template and the parameter to a function?

626


What is polymorphism & list its types in c++?

614


What is the use of class in c++?

562


What are the main features of c++?

538


What is main function in c++ with example?

554


Define 'std'.

600


Is c++ a dying language?

581


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

999


What is enum c++?

606