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...

Given two strings like x=?hello? and y=?open?, remove any
character from string x which is also used in string y,
thus making the result x=?hll?.

Answer Posted / sourabh bose

int countX=0;
int countY=0;
string tmp=x;
for(countX=1;countX<=x.lenth();countX++)
{
for(countY=1;countY<=y.length();countY++)
{
if x.substring(1,countX).Equels(y.substring(1,countY)
{
tmp=tmp.Replace(tmp.substring(1,countX),"");
}
}
}
x=tmp;

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between polymorphism and inheritance?

1132


Are polymorphisms mutations?

1214


What is polymorphism and example?

1099


What does and I oop mean in text?

1316


How Do you Code Composition and Aggregation in C++ ?

25615


Why is object oriented programming so hard?

1134


What is protected in oop?

1118


What do you mean by Encapsulation?

1140


what is the sylabus for priliminaries?

2226


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6994


What is debug class?what is trace class? What differences are between them? With examples.

2262


How to hide the base class functionality in Inheritance?

1187


Why is abstraction used?

1139


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

2255


How long to learn object oriented programming?

1145