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 abstraction with example?
What causes polymorphism?
State what is encapsulation and friend function?
How do you explain polymorphism?
What is abstraction in oops?
What is abstraction example?
What is and I oop mean?
What are oops methods?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
Why interface is used?
Why is object oriented programming so hard?
What is the full form of oops?
What is multilevel inheritance?
What is difference between pop and oop?
What is the difference between a mixin and inheritance?