how to swap two strings without using any third variable ?
Answer Posted / ashutosh
say a = 10 and b = 20;
b = a + b;// b= 30
a = b - a;// a= 20
b = b - a;// b= 10
so now a = 20 b= 10
| Is This Answer Correct ? | 27 Yes | 16 No |
Post New Answer View All Answers
What new()is different from malloc()?
What is using namespace std in cpp?
what is the use of void main() in C++ language?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
Define virtual constructor.
What is size of string in c++?
Which operations are permitted on pointers?
List different attributes in C++?
What are the extraction and insertion operators in c++?
What is operator overloading in c++ example?
What is the v-ptr?
Can we get the value of ios format flags?
What is the difference between structures and unions?
Explain bubble sorting.
How a macro differs from a template?