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 purpose of enum?
Can a varargs method be overloaded?
What are the 5 oop principles?
What is static in oop?
What does <> mean pseudocode?
What is the main feature of oop?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout<
What is coupling in oop?
How do you define social class?
What is the real life example of polymorphism?
Which is not an object oriented programming language?
explain sub-type and sub class? atleast u have differ it into 4 points?
Write a program to reverse a string using recursive function?
write a programe to calculate the simple intrest and compund intrest using by function overlading
Can bst contain duplicates?