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 new()is different from malloc()?

1049


What is using namespace std in cpp?

1068


what is the use of void main() in C++ language?

1065


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1039


Define virtual constructor.

1036


What is size of string in c++?

930


Which operations are permitted on pointers?

948


List different attributes in C++?

1020


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

948


What is operator overloading in c++ example?

1053


What is the v-ptr?

1106


Can we get the value of ios format flags?

1074


What is the difference between structures and unions?

1015


Explain bubble sorting.

1026


How a macro differs from a template?

1105