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 / 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


Please Help Members By Posting Answers For Below Questions

Is data hiding and abstraction same?

1057


Can we create object of abstract class?

1103


What does oop mean in snapchat?

1251


What is the point of oop?

1194


Why do pointers exist?

1106


What is oops with example?

1058


How to use CMutex, CSemaphore in VC++ MFC

4787


Can bst contain duplicates?

1205


What is abstraction encapsulation?

1138


Can an interface inherit a class?

1073


Can we have inheritance without polymorphism?

1036


write a program to find 2 power of a 5digit number with out using big int and exponent ?

2392


What are the benefits of interface?

1067


write knight tour problem which is present in datastructure

2662


What is the real life example of polymorphism?

1179