Home »
MCQs »
OOPs MCQs
If there are different sections of an organization such as IT, computer science, Civil, Mechanical, etc. Each organization has the same attributes such as student name, roll number, year, etc. which comes under a class Student then this comes under which type of inheritance?
99. If there are different sections of an organization such as IT, computer science, Civil, Mechanical, etc. Each organization has the same attributes such as student name, roll number, year, etc. which comes under a class Student then this comes under which type of inheritance?
- Hierarchical inheritance
- Hybrid inheritance
- Multilevel inheritance
- Multiple inheritances
Answer: A) Hierarchical inheritance
Explanation:
All the sections inherit the student properties and thus follow the format of hierarchical inheritance.