Which Type Of Inheritance Is Illustrated By The Following Codep #722
Which type of inheritance is illustrated by the following code?</p> <pre><code class="language-cpp"> class student{ public: int marks; }; class topper: public student { public: char grade; }; class average{ public: int makrs_needed; }; class section: public average{ public: char name[10]; }; class overall: public average{ public: int students; };</code></pre>
This multiple choice question (MCQ) is related to the book/course
gs gs111 OOP Object Oriented Programming Java.
It can also be found in
gs gs111 Inheritance & its Types - OOPs MCQ: Types of Inheritance - Quiz No.1.
Which type of inheritance is illustrated by the following code?
class student{ public: int marks; }; class topper: public student { public: char grade; }; class average{ public: int makrs_needed; }; class section: public average{ public: char name[10]; }; class overall: public average{ public: int students; };
Single level
Multilevel and single level
Hierarchical
Hierarchical and single level