Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to swap two numbers with out using temp variable

Answers were Sorted based on User's Feedback



how to swap two numbers with out using temp variable..

Answer / dd

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

Is This Answer Correct ?    12 Yes 16 No

how to swap two numbers with out using temp variable..

Answer / kusum

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

Is This Answer Correct ?    0 Yes 21 No

Post New Answer

More C++ General Interview Questions

What is format for defining a structure?

0 Answers  


What is difference between c++ and c ++ 14?

0 Answers  


Show the application of a dynamic array with the help of an example.

0 Answers  


what is Member Functions in Classes?

0 Answers  


What is rvalue?

0 Answers  


What is public, protected, private in c++?

0 Answers  


What is the cout in c++?

0 Answers  


What are the differences between the function prototype and the function defi-nition?

0 Answers  


Is sorted c++?

0 Answers  


What relational operators if statements in c++?

0 Answers  


Mention the ways in which parameterized can be invoked. Give an example of each.

0 Answers  


What is the difference between containment and delegation?

0 Answers  


Categories