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?.
Answers were Sorted based on User's Feedback
Answer / nisha sharma
class Stringb
{
public static void main(String a[])
{
StringBuffer sb=new StringBuffer("Hello");
StringBuffer sb1=sb.deleteCharAt(1);
StringBuffer sb2=sb1.deleteCharAt(3);
System.out.println(sb2);
}
}
| Is This Answer Correct ? | 4 Yes | 6 No |
Answer / bijoy kumar baral
Public abstract ClassDemo
{
public static void main(string args[]){
StringBuffer sb1= new stringBuffer("Hello");
StringBuffer sb2= new stringBuffer("open");
stringbuffer a= sb.deletecharacterAt("hello",1);
system.out.println("the value of a:"+a);
stringBuffer x=sb.deletecharacterAt("hllo"3);
system.out.println(x:+"x");
}
| Is This Answer Correct ? | 1 Yes | 4 No |
Answer / shilpa
x="hello", y="open"
so we have to remove e and o from x, so its hll
| Is This Answer Correct ? | 0 Yes | 8 No |
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
What is ambiguity in c++
What is the purpose of enum?
What is difference between #define and const?
Petrol pump mgt. system: To design a program that display an interface for the sale of the Petrol and then make the entries at the backend in the database.
to find out the minimum of two integer number of two different classes using friend function
What is polymorphism what are the different types of polymorphism?
What is interface? When and where is it used?
what is the function of 'this' operator ?
How to call a non virtual function in the derived class by using base class pointer
what is different between oops and c++
write a program to find 2 power of a 5digit number with out using big int and exponent ?