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 / sourabh bose
int countX=0;
int countY=0;
string tmp=x;
for(countX=1;countX<=x.lenth();countX++)
{
for(countY=1;countY<=y.length();countY++)
{
if x.substring(1,countX).Equels(y.substring(1,countY)
{
tmp=tmp.Replace(tmp.substring(1,countX),"");
}
}
}
x=tmp;
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Plese get me a perfect C++ program for railway/airway reservation with all details.
what type of questions
What is destructor oops?
What is encapsulation selenium?
c++ program to swap the objects of two different classes
Is enum a class?
What is encapsulation in ict?
What is object in oops?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
Can we override main method?
Why do we need oop?
What is the point of polymorphism?
Explain the concepts involved in Object Oriented programming.
why reinterpret cast is considered dangerous?
What is the difference between encapsulation and polymorphism?