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

a=1
b=2
a=a+(b-a)
b=(a+b)-b

Is This Answer Correct ?    12 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain Text Manipulation Routines?

1055


How do we implement inheritance in c++?

1100


How to access a variable of the structure?

1046


What are the extraction and insertion operators in c++?

961


Do class declarations end with a semicolon?

1048


What are the differences between new and malloc?

1082


What is a container class?

1085


Where and why do I have to put the "template" and "typename" keywords?

1003


What is algorithm in c++ programming?

1086


How can a called function determine the number of arguments that have been passed to it?

1106


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

1013


What is a constructor in c++ with example?

1108


How can you link a c program with a c function?

1044


How can you specify a class in C++?

1243


What is operator overloading in c++ example?

1079