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
what is the drawback of classical methods in oops?
What is super in oop?
Can static class have constructor?
Can we create object of interface?
What is the difference between abstraction and polymorphism?
What is encapsulation in ict?
write a program that takes input in digits and display the result in words from 1 to 1000
What is the real time example of inheritance?
Where is pseudocode used?
What is overriding in oop?
What is the real life example of polymorphism?
What is methods in oop?
What is the oops and benefits of oops programming?
What is inheritance write a program to show use of inheritance?
What is and I oop mean?