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 polymorphism and types?

594


which feature are not hold visual basic of oop?

1721


What are classes oop?

594


How to improve object oriented design skills?

565


What is the point of polymorphism?

580






What is the fundamental idea of oop?

634


What are benefits of oop?

631


Why is polymorphism used?

578


Why polymorphism is used in oops?

578


Why is it so that we can have virtual constructors but we cannot have virtual destructors?

3818


What is property in oops?

564


Get me an image implementation program.

1557


Why is abstraction used?

599


Which language is not a true object oriented programming language?

634


Why is polymorphism needed?

590