how to swap two numbers with out using temp variable

Answer Posted / kusum

if (a>b)
temp=a;
a=b;
b=temp;

Is This Answer Correct ?    0 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain friend class?

630


What are arrays c++?

612


Out of fgets() and gets() which function is safe to use?

641


What are the extraction and insertion operators in c++? Explain with examples.

652


Explain 'this' pointer and what would happen if a pointer is deleted twice?

604






Explain virtual destructor?

676


Is there a c++ certification?

606


Tell me difference between constant pointer and pointer to a constant.

632


What is math h in c++?

607


Explain container class.

687


What are formatting flags in ios class?

607


Write about the members that a derived class can add?

568


What is the use of turbo c++?

551


How to tokenize a string in c++?

604


Can I learn c++ without c?

603