Object Oriented Programming interview questions part 53

Object Oriented Programming interview questions part 53

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

Total Questions: 11

1. Where the virtual function should be defined?

Correct Answer is : Base class

2. The resolving of virtual functions is done at ______________

Correct Answer is : Runtime

3. In which access specifier should a virtual function be defined?

Correct Answer is : Public

4. Virtual functions can never be made _______________

Correct Answer is : Static function

5. Virtual functions can’t be made friend function of other classes.

Correct Answer is : TRUE

6. Which is must condition for virtual function to achieve runtime polymorphism?

Correct Answer is : Virtual function must be accessed using pointer or reference

7. Which among the following is true for virtual functions?

Correct Answer is : Prototype must be same in base class and derived class

8. The virtual functions must be declared and defined in _____________ class and overridden in ___________ class.

Correct Answer is : Base, derived

9. It is __________ to redefine the virtual function in derived class?

Correct Answer is : Not necessary

10. Which among the following is true?

Correct Answer is : A class may have virtual destructor but not virtual constructor

11. If virtual function of base class is redefined in derived class then, ________________________

Correct Answer is : It may or may not be declared virtual in derived class

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon