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 byval and byref? What are differences between them?
What is difference between abstraction and encapsulation?
Why is oop better than procedural?
Why is object oriented programming so hard?
• What are the desirable attributes for memory managment?
Why do pointers exist?
to find out the minimum of two integer number of two different classes using friend function
What is ambiguity in inheritance?
What is polymorphism in oops with example?
What is polymorphism explain its types?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
What is stream in oop?
What is the difference between a mixin and inheritance?
Why we use classes in oop?
Why is oop useful?