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
Explain unexpected() function?
What are the classes in c++?
what is multi-threading in C++?
Difference between pointer to constant and constant pointer to a constant. Give example.
What can c++ be used for?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
Why do we learn c++?
In the derived class, which data member of the base class are visible?
What is algorithm in c++ programming?
What are the implicit member functions of class?
What is a class template in c++?
How do you declare A pointer to function which receives an int pointer and returns a float pointer
What are the advantages of early binding?
What are the two types of comments?
Explain virtual destructor?