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 are single and multiple inheritances in c++?

1057


Implement stack operations with pointers with appropriate exception checks.

943


What is the full form of stl in c++?

1158


Why was c++ created?

986


give me an example for testing a program showing the test path .show how the test is important and complex.

2885


When do we run a shell in the unix system? How will you tell which shell you are running?

927


Write about the use of the virtual destructor?

980


Are strings immutable in c++?

1133


What is the standard template library (stl)?

1649


Do you know what are pure virtual functions?

1115


Explain the uses of static class data?

1068


What operator is used to access a struct through a pointer a) >> b) -> c) *

1069


What is the protected keyword used for?

1071


What is the precedence when there is a global variable and a local variable in the program with the same name?

1083


What is pointer -to-members in C++? Give their syntax?

1002