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 / m@c
string x = "?hello?", y = "?open?";
char strm = '?';
for (int ictr = 0; ictr < y.Length; ictr++)
{
if (!strm.Equals(y[ictr]))
{
x=x.Replace(Convert.ToString(y[ictr]),"");
}
}
Response.Write(x);
Results will be <b>?hhl?</b>
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is abstract class in oop?
how to get the oracle certification? send me the answer
What is inheritance in simple words?
Why do we use encapsulation in oops?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
What is oops?what is its use in software engineering?
What is polymorphism and its types?
What is difference between multiple inheritance and multilevel inheritance?
Which method cannot be overridden?
Why do pointers exist?
Can we override main method?
Why polymorphism is used in oops?
Why is static class not inherited?
What is abstraction encapsulation?
program for insertion ,deletion,sorting in double link list