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

//swaping of 2 numbers without using temp variable
//a=5 & b=6
a=a+b; //a=30
b=a-b; //b=5
a=a-b; //a=6

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does flush do c++?

1069


Explain function overloading

1022


What is pointer to array in c++?

1170


What is the difference between an external iterator and an internal iterator?

1108


What is istream c++?

1201


Explain the register storage classes in c++.

1188


What are the implicit member functions of class?

1091


Explain register storage specifier.

1025


What are formatting flags in ios class?

1307


What is the v-ptr?

1167


Do you need a main function in c++?

1125


Write about an iterator class?

1086


Explain mutable storage class specifier.

1094


Program to check whether a word is a sub-string or not of a string typed

2039


Can we use this pointer inside static member function?

1074