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 / vaibhav meena

Its simple:
For Integer Values

A^=B^=A

and with arithmetic operators :

All the above answers are right

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define vptr.

1026


If a header file is included twice by mistake in the program, will it give any error?

1036


how to access grid view row?

2228


what are the types of Member Functions?

1123


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

1097


How the delete operator differs from the delete[]operator?

1091


Is there any function that can skip certain number of characters present in the input stream?

1060


How do I use turbo c++?

984


What is c++ redistributable?

1225


Which field is used in c++?

1103


Is it possible to get the source code back from binary file?

1352


Define stacks. Provide an example where they are useful.

1004


What is runtime errors c++?

1115


How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?

1136


Can we distribute function templates and class templates in object libraries?

1073