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


Please Help Members By Posting Answers For Below Questions

What is the purpose of enum?

759


Can a varargs method be overloaded?

804


What are the 5 oop principles?

831


What is static in oop?

820


What does <> mean pseudocode?

833


What is the main feature of oop?

891


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1629


What is coupling in oop?

769


How do you define social class?

800


What is the real life example of polymorphism?

843


Which is not an object oriented programming language?

725


explain sub-type and sub class? atleast u have differ it into 4 points?

2037


Write a program to reverse a string using recursive function?

2019


write a programe to calculate the simple intrest and compund intrest using by function overlading

1887


Can bst contain duplicates?

935