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

What does n mean in c++?

1100


Explain the difference between c & c++?

1040


What does obj stand for?

1113


What are the uses of static class data?

1146


Define pointers?

1023


What is the c++ code?

1103


What is the difference between set and map in c++?

1112


Explain polymorphism?

1049


Eplain extern keyword?

991


Are strings immutable in c++?

1135


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?

962


Explain selection sorting?

1041


What do you understand by zombie objects in c++?

1062


What is type of 'this' pointer?

1022


Can we sort map in c++?

977