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

Are vectors faster than arrays?

1005


Who calls main function?

1114


How would you implement a substr() function that extracts a sub string from a given string?

1047


What is the hardest coding language to learn?

1042


Can you overload the operator+ for short integers?

1043


Why c++ does not have finally?

1083


How much do coding jobs pay?

1013


Is atoi safe?

1053


What is c++ used for in games?

1171


How is c++ used in the real world?

1037


How do you traverse a btree in backward in-order?

1035


How does class accomplish data hiding in c++?

1182


Why pointer is used in c++?

1167


What is object in c++ wikipedia?

1004


Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL

812