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 the fundamental idea of oop?
Can abstract class have normal methods?
What are the 5 oop principles?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
Why polymorphism is used in oops?
Why do we use class?
What is the real time example of encapsulation?
What is the purpose of polymorphism?
What is encapsulation with example?
What is coupling in oop?
What is an example of genetic polymorphism?
What is the example of polymorphism?
Plese get me a perfect C++ program for railway/airway reservation with all details.
Why is oop better than procedural?
What is the difference between static polymorphism and dynamic polymorphism?