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
What is oops in c++?
What is a manipulative person?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
How do you find out if a linked-list has an end?
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
How a pointer differs from a reference?
Can we define function inside main in c++?
Is c++ the hardest language?
Is empty stack c++?
What is meant by the term name mangling in c++?
What is the best c c++ compiler for windows?
How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?
Which software is used for c++ programming?
What is c++ programming language?
Do the names of parameters have to agree in the prototype, definition, and call to the function?