Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Why is oop useful?

1045


What is the important feature of inheritance?

1078


What is encapsulation with example?

1036


Get me a number puzzle game-program

2200


Why is static class not inherited?

1056


How does polymorphism work?

1084


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1938


Can static class have constructor?

993


What is pure oop?

1054


How to use CMutex, CSemaphore in VC++ MFC

4743


What is methods in oop?

931


What is abstraction and encapsulation?

950


What are the benefits of oop?

1179


What is abstraction in oops with example?

1223


What is difference between abstraction and encapsulation?

1024