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 oops in c++?

1111


What is a manipulative person?

1074


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

1129


How do you find out if a linked-list has an end?

1175


Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.

1089


How a pointer differs from a reference?

1385


Can we define function inside main in c++?

1064


Is c++ the hardest language?

1031


Is empty stack c++?

1054


What is meant by the term name mangling in c++?

1002


What is the best c c++ compiler for windows?

1100


How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?

1202


Which software is used for c++ programming?

1131


What is c++ programming language?

1147


Do the names of parameters have to agree in the prototype, definition, and call to the function?

1075