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
Is data hiding and abstraction same?
Can we create object of abstract class?
What does oop mean in snapchat?
What is the point of oop?
Why do pointers exist?
What is oops with example?
How to use CMutex, CSemaphore in VC++ MFC
Can bst contain duplicates?
What is abstraction encapsulation?
Can an interface inherit a class?
Can we have inheritance without polymorphism?
write a program to find 2 power of a 5digit number with out using big int and exponent ?
What are the benefits of interface?
write knight tour problem which is present in datastructure
What is the real life example of polymorphism?