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 / amadou
. static void Main(string[] args)
{
string x = "hello";
string y = "open";
string temp = "";
for (int i = 0; i < x.Length; i++)
{
if (!y.ToString().Contains(x[i]))
{
temp += x[i];
}
Console.WriteLine("temp={0}",
temp);
}
Console.Read();
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is overloading in oops?
write string class as your own class in java without using any built-in function
What is the real life example of polymorphism?
Why is abstraction used?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
What does it mean when someone says I oop?
What is purpose of inheritance?
How to hide the base class functionality in Inheritance?
What is oops and its features?
Why do we use inheritance?
What is super in oop?
What is abstract class in oops?
How do you achieve polymorphism?
What is the oops and benefits of oops programming?
Where is pseudocode used?