how to swap two strings without using any third variable ?

Answer Posted / ankit sharma

ANSWER 4 IS BEST AND EASIEST SOLUTION.....THANKS BUDDY
PLEASE DON'T REFER ABOVE THREE SOLUTION BCOZ THEY ARE FOR INTEGER NOT FOR STRING.
I RATED 4TH SOLUTION IS 5/5.

Is This Answer Correct ?    16 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a terminating character in c++?

783


What is malloc in c++?

567


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

3713


How do I get good at c++ programming?

611


What is the role of C++ shorthand's?

685






can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is somewhere #include #include #include using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<

1649


What is ios flag in c++?

698


Can we use this pointer inside static member function?

638


What is the return value of the insertion operator?

616


What type of question are asked in GE code writing test based on c++ data structures and pointers?

3517


What is namespace & why it is used in c++?

614


What is the difference between the indirection operator and the address of oper-ator?

616


What's the order in which the objects in an array are destructed?

873


What is the size of integer variable?

605


Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.

619