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 / raja

if a=10& b=20

a=a+b //a=30
b=a-b //b=10
a=a-b //a=20

finally we got a=20,b=10

Is This Answer Correct ?    10 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What should main() return in c and c++?

967


Differentiate between an external iterator and an internal iterator?

941


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

2272


What is name hiding in c++?

1106


What is the best book for c++ beginners?

978


What is data types c++?

955


What does h mean in maths?

1103


What is a multiset c++?

1072


What is the difference between global int and static int declaration?

947


What is iostream in c++ used for?

971


Can user-defined object be declared as static data member of another class?

963


program explaining feautures of c++

2389


What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.

997


What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor

1099


Which operator cannot be overloaded c++?

963