how to swap two strings without using any third variable ?
Answer Posted / kollu.praveen
var1="String1"
var2="String2"
var1=var1+var2
var2=mid(var1,1,Len(var1)-Len(var2))
print var2
var1=mid(var1,(Len(var1)-Len(var2)+1),(Len(var2)+1))
print var1
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
How do I write a c++ program?
Can you please explain the difference between static and dynamic binding of functions?
Give example of a pure virtual function in c++?
What are files in c++?
Explain selection sorting. Also write an example.
Name the debugging methods that are used to solve problems?
Why c++ is created?
What is a pointer how and when is it used?
What can I safely assume about the initial values of variables which are not explicitly initialized?
Why do we use double in c++?
Does improper inheritance have a potential to wreck a project?
What is using namespace std in cpp?
What are pointers used for c++?
What is pair in c++?
What is a string example?