Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do I write a c++ program?

1125


Can you please explain the difference between static and dynamic binding of functions?

1042


Give example of a pure virtual function in c++?

1182


What are files in c++?

1046


Explain selection sorting. Also write an example.

1064


Name the debugging methods that are used to solve problems?

1105


Why c++ is created?

1018


What is a pointer how and when is it used?

1106


What can I safely assume about the initial values of variables which are not explicitly initialized?

1070


Why do we use double in c++?

1080


Does improper inheritance have a potential to wreck a project?

1167


What is using namespace std in cpp?

1179


What are pointers used for c++?

1072


What is pair in c++?

1079


What is a string example?

1107