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 polymorphism explain its types?
Why is polymorphism used?
Why do we use encapsulation in oops?
State what is encapsulation and friend function?
What is super in oop?
Why is destructor used?
Can bst contain duplicates?
#include
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
What is the purpose of enum?
What is abstraction in oops?
What is encapsulation in simple terms?
What is the example of polymorphism?
Why is there no multiple inheritance?
What are the data types in oop?