C++ Interview Questions
Questions Answers Views Company eMail

OOP'S advantages of inheritance include:

Infosys,

1 10222

The type of variable a pointer points to must be the part of pointer's definition so that:

Infosys,

1 5012

What is this interview room ? Is it a class or an object.

CybAge, NSN, Wipro,

3 11033

can output 5 students using one dimensional array

Intel,

1 3065

write a program that takes two numbers from user that prints the smallest number

2 3997

Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

1981

WAP to generate 2n+1 lines of the following pattern on the computer screen:

2 4960

Give two integer arrays A & B.A has n elements and B has ' n-1 ' elements . A has all the elements that are there in B. But B has one missing element. Write a function that takes arrays , A & B as imnput and finds the missing element in most optised manner .

Zycus Infotech,

4 10267

what is difference between class template and template class?

2134

what is the 3 types of system development life cycle

2399

Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

Cankaya University,

2012

C++ program output? Explain output of this program. #include using std::cout; using std::cin; int main() {   cout< 1 2343


how many types of notations are in java

National University of Modern Languages (NUML),

1 2352

differentiate between private, public and protected data members of the class using example.

1 2042

Write a C++ program which will compute the volume of a sphere or a cylinder after prompting the user to type the first character for the shape name.

An-Najah National University,

1666


Un-Answered Questions { C++ }

What does no cap mean?

567


What is the purpose of template?

593


Is it possible to have a recursive inline function in c++?

521


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1383


Define copy constructor.

599






Is c++ free?

559


What is meant by forward referencing and when should it be used?

527


Do class declarations end with a semicolon? Do class method definitions?

591


How do you clear a map in c++?

537


What is debug class?what is trace class? What differences are between them? With examples.

1577


What is balance factor?

562


What jobs can you get with a c++ certification?

558


Why c++ is the best language?

567


Is it possible for a member function to delete the pointer, named this?

589


can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is somewhere #include #include #include using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<

1621