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

How java is different from c and c++?

1192


What is atoi in c++?

1070


What is class definition in c++ ?

1079


If you don’t declare a return value, what type of return value is assumed?

947


What is vector processing?

1138


Can you please explain the difference between overloading and overriding?

1089


What is lazy initialization in c++?

1100


What are associate containers?

1020


Write is a binary search tree? Write an algo and tell complexity?

1020


Can we declare a base-class destructor as virtual?

1003


What is a try block?

1070


What happens if a pointer is deleted twice?

1268


What is the difference between while and do while loop? Explain with examples.

1103


What is data abstraction? How is it different from data encapsulation?

995


What is c++ 11 and c++ 14?

1043