how to swap two strings without using any third variable ?

Answers were Sorted based on User's Feedback



how to swap two strings without using any third variable ?..

Answer / sivaraj

Is the Answer 1 posted by ashutosh works for nagative numbers ?
best answer :

a=a^b;
b=a^b;
a=a^b;

Is This Answer Correct ?    7 Yes 15 No

Post New Answer

More C++ General Interview Questions

Differentiate between late binding and early binding.

0 Answers  


What is the difference between an external iterator and an internal iterator?

0 Answers  


What is a literal in c++?

0 Answers  


What is a stack c++?

0 Answers  


What is difference between shallow copy and deep copy? Which is default?

1 Answers  






What is this pointer in c++?

1 Answers  


What is an opaque pointer?

1 Answers  


What is the stack?

5 Answers   IBM, ICICI,


What is endl c++?

0 Answers  


What is linked list in c++?

0 Answers  


What are the advantages and disadvantages of using inline and const?

2 Answers   Polaris, TCS, Zimmer Biomet,


What is the basic structure of a c++ program?

0 Answers  


Categories