Name the type of inheritance if Sports, Coach, Player are C++ classes and (→)…
2022
Name the type of inheritance if Sports, Coach, Player are C++ classes and (→) denotes inheritance.
- A.
Multiple Inheritance
- B.
Multi-level Inheritance
- C.
Doubly Inheritance
- D.
Hybrid Inheritance
Attempted by 507 students.
Show answer & explanation
Correct answer: B
In multi-level inheritance, a class is derived from another class, which itself is derived from another class. Here, Player is derived from Coach, and Coach is derived from Sports, forming a chain of inheritance.
A video solution is available for this question — log in and enroll to watch it.