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

What is overloading in oops?

1092


write string class as your own class in java without using any built-in function

2443


What is the real life example of polymorphism?

1111


Why is abstraction used?

1028


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

2140


What does it mean when someone says I oop?

1016


What is purpose of inheritance?

1050


How to hide the base class functionality in Inheritance?

1090


What is oops and its features?

1025


Why do we use inheritance?

1061


What is super in oop?

1088


What is abstract class in oops?

974


How do you achieve polymorphism?

1037


What is the oops and benefits of oops programming?

926


Where is pseudocode used?

1029