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 is polymorphism in c++? Explain with an example?

1056


Why is c++ still best?

995


Who made c++?

1097


What are the two types of comments, and how do they differ?

1150


What is else syntax in c++?

1222


Where do I find the current c or c++ standard documents?

1105


Define virtual constructor.

1108


What is an object in c++?

1277


What is friend class in c++ with example?

1060


What is c++ mutable?

1123


What is the auto keyword good for in c++?

1201


Difference between struct and class in terms of access modifier.

1202


How did c++ get its name?

1044


Can you please explain the difference between overloading and overriding?

1114


Why c++ is the best language?

1076