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 / rohit kapade

bool SwapString(char **s1,char **s2)
{
char *temp = NULL;
temp = *s1;
*s1 = *s2;
*s2 = temp;
//strcpy(temp,s1);
//strcpy(s1, s2);
//strcpy(s2, temp);
return true;
}

Is This Answer Correct ?    0 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is general format for a prototype?

1040


What is friend class in c++ with example?

1027


What is c++ array?

1115


What is extern c++?

1005


What is the difference between method overloading and method overriding in c++?

1150


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

801


Difference between an inspector and a mutator

1334


What is binary object model?

1022


Incase of a function declaration, what is extern means?

968


Do you know what are pure virtual functions?

1143


How long will it take to learn programming?

1056


What is code reusability in c++?

1242


Describe the advantage of an external iterator.

1038


Can manipulators fall in love?

1005


what is VOID?

1061