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

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

give me an example for testing a program showing the test path .show how the test is important and complex.

2872


Why is it necessary to use a reference in the argument to the copy constructor?

1068


What is format for defining a structure?

1041


What is purpose of new operator?

1025


What is meant by the term name mangling in c++?

916


Explain all the C++ concepts using examples.

1161


What is a c++ vector?

1000


Does a derived class inherit or doesn't inherit?

1043


Can member functions be private?

964


What is abstraction in c++ with example?

1044


Which c++ operator cannot overload?

936


Explain how would you handle a situation where you cannot call the destructor of a local explicitly?

923


Why was c++ created?

978


What is else syntax in c++?

1133


Can recursive program be written in C++?

1192