In the following statements,
class sports {};
class test : public student{};
class result : public test, public sports {};

//Here result class have implemented,

Options
- Hierarchical inheritance
- Multiple inheritance
- Multilevel inheritance
- Both b) and c)


CORRECT ANSWER : Both b) and c)

Discussion Board
C++ - Inheritance

The above base and derived classes are the example of Multiple and Multilevel Inheritance. Class student and class sports are the base class. Class test is a derived class, derived from class student. It indicates multilevel inheritance.
Class result is a derived class, derived from class test and class sports. It indicates multiple inheritance.

Prajakta Pandit 01-30-2017 01:02 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement