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 general format for a prototype?
What is friend class in c++ with example?
What is c++ array?
What is extern c++?
What is the difference between method overloading and method overriding in c++?
Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL
Difference between an inspector and a mutator
What is binary object model?
Incase of a function declaration, what is extern means?
Do you know what are pure virtual functions?
How long will it take to learn programming?
What is code reusability in c++?
Describe the advantage of an external iterator.
Can manipulators fall in love?
what is VOID?