Object- Oriented Programming Interview Questions - 14 | Snaprecruit.com

Object- Oriented Programming Interview Questions - 14 | Snaprecruit.com

Object Oriented Programming interview questions part 14

Object Oriented Programming interview questions part 14

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Which among the following is best definition of a derived class?

Correct Answer is : A class which inherits one or more classes

2. Which among the following is inherited by a derived class from base class?

Correct Answer is : All the members except private members

3. If there is a derived class in a program, how many classes must be in that program?

Correct Answer is : 2

4. Which members can never be accessed in derived class from the base class?

Correct Answer is : All except private

5. How many types of inheritance are supported in C++ for deriving a class?

Correct Answer is : 3

6. How many derived class can a single base class have?

Correct Answer is : As many are required

7. Which among the following is correct?

Correct Answer is : Friend function of derived class can access non-private members of base class

8. If a class is being derived using more than two base classes, which inheritance will be used?

Correct Answer is : Multiple

9. Derived class is also known as ______________ class.

Correct Answer is : Subclass

10. If class A is derived from another derived class B which is derived from class C, which class will have maximum level of abstraction?

Correct Answer is : Class C

11. If base class is an abstract class then derived class ______________ the undefined functions.

Correct Answer is : Must become another abstract class or define

12. How many classes can be derived from a derived class?

Correct Answer is : As many as required

13. The members of a derived class can never be derived.

Correct Answer is : FALSE

14. Which feature is not related to the derived classes among the following?

Correct Answer is : Run time memory management

15. Deriving a class in such a way that that the base class members are not available for further inheritance is known as ___________________

Correct Answer is : Private inheritance

16. Which among the following describes a destructor?

Correct Answer is : A special function that is called to free the resources, acquired by the object

17. When a destructor is called?

Correct Answer is : Just before the end of object life

18. Which among the following is correct for abstract class destructors?

Correct Answer is : It doesn’t have destructors

19. If in multiple inheritance, class C inherits class B, and Class B inherits class A. In which sequence are their destructors called, if an object of class C was declared?

Correct Answer is : ~C() then ~B() then ~A()

20. Choose the correct sequence of destructors being called for the following code: class A{ }; class B{ }; class C: public A, public B{ };

Correct Answer is : ~C(), ~B(), ~A()

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon