how to swap two numbers with out using temp variable

Answer Posted / dd

a=1
b=2
a=a+(b-a)
b=(a+b)-b

Is This Answer Correct ?    12 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are c++ manipulators?

610


Who made c++?

610


Do you know what are static and dynamic type checking?

620


What is the header file for setw?

576


Explain the uses of static class data?

597






Is c++ still in demand?

634


What is bubble sort c++?

576


Explain stack unwinding.

636


Explain storage qualifiers in c++.

620


Why we use #include conio h in c++?

597


Define the process of error-handling in case of constructor failure?

571


Is dev c++ free?

612


Is c++ the hardest language?

565


Differences between private, protected and public and give examples.

577


Is the declaration of a class its interface or its implementation?

704