how to swap two numbers with out using temp variable

Answer Posted / prasannaroy

a=10;
b=20;
b=a+b-(a=b);

Is This Answer Correct ?    8 Yes 2 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?

725


What is the use of object in c++?

684


What is the most powerful coding language?

706


What c++ library is string in?

691


Is c++ slower than c?

668






Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c

911


Can we get the value of ios format flags?

761


How would you find out if a linked-list is a cycle or not?

642


Explain the virtual inheritance in c++.

691


Can union be self referenced?

672


Why do we use templates?

698


What is vector processing?

766


How can I improve my c++ skills?

662


What are proxy objects in c++?

739


When should we use multiple inheritance?

700