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

what is C++ objects?

0 Answers  


Can comments be nested?

0 Answers  


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

0 Answers   CTS,


What is the full form of india?

0 Answers  


What is the difference between global variables and static varables?

0 Answers  






What will happen if when say delete this ?

7 Answers  


What is the difference between new/delete and malloc/free?

1 Answers  


Is c++ platform dependent?

0 Answers  


Can we make any program in c++ without using any header file and what is the shortest program in c++.

0 Answers   MCN Solutions,


Why should we use null or zero in a program?

0 Answers  


What is difference between malloc()/free() and new/delete?

0 Answers  


what are the iterator and generic algorithms.

0 Answers  


Categories