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 / sachin patil

a = 5;
b = 10;
a = a+b;
b = a-b;
a = a-b;

Is This Answer Correct ?    55 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is time h in c++?

1149


How can you tell what shell you are running on unix system?

1130


Can a function take variable length arguments, if yes, how?

1022


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

2326


How const int *ourpointer differs from int const *ourpointer?

1151


When are exception objects created?

1091


What is the arrow operator in c++?

1039


How would you find out if a linked-list is a cycle or not?

1018


What are the various oops concepts in c++?

1060


Which programming language's unsatisfactory performance led to the discovery of c++?

1349


What is constructor and destructor in c++?

1127


How do I start a c++ project?

1088


What is the limitation of cin while taking input for character array?

2098


What are the benefits of operator overloading?

1229


Which sort does c++ use?

1029