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 strings without using any third variable ?

Answer Posted / ashutosh

say a = 10 and b = 20;
b = a + b;// b= 30
a = b - a;// a= 20
b = b - a;// b= 10

so now a = 20 b= 10

Is This Answer Correct ?    27 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an accessor in c++?

1042


What is size of string in c++?

949


Is c++ map a hash table?

993


Do class declarations end with a semicolon? Do class method definitions?

1117


Define pure virtual function?

952


What is command line arguments in C++? What are its uses? Where we have to use this?

1224


What is the use of 'this' pointer?

1234


Explain overriding.

964


In the derived class, which data member of the base class are visible?

1087


Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?

2470


Why do we learn c++?

929


Explain the uses oof nested class?

1110


How do I start a c++ project?

1044


Explain how would you handle a situation where you cannot call the destructor of a local explicitly?

941


How many types of modularization are there in c++?

1048