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 happens when you make call 'delete this;'?

1081


What is a pointer with example?

1240


Which software is best for c++ programming?

1046


What is constructor c++?

1113


What are the four partitions in which c++ compiler divides the ram?

1229


What is the insertion operator and what does it do?

1039


What is new in c++?

1098


What are keywords in c++?

1093


What is iterator in c++?

1101


Define friend function.

1041


How new/delete differs from malloc()/free?

1137


When should overload new operator on a global basis or a class basis?

1077


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

1167


What is a singleton class c++?

1028


What is this weird colon-member (" : ") syntax in the constructor?

1023