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's the hardest coding language?

1012


Show the declaration for a static function pointer.

1065


What is class syntax c++?

1170


Do we have to use initialization list in spite of the assignment in constructors?

1015


What are stacks? Give an example where they are useful.

1074


What is near, far and huge pointers? How many bytes are occupied by them?

1129


How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?

1300


Write a recursive program to calculate factorial in c++.

1097


What does asterisk mean in c++?

1126


How much maximum can you allocate in a single call to malloc()?

1119


Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

1022


What is a constructor in c++ with example?

1147


Is c++ used anymore?

1104


Differentiate between the message and method in c++?

1081


What is the use of 'this' pointer?

1264