Does Following Code Show Multiple Inheritancep Pre Langcpp #763
Does following code show multiple inheritance?</p> <pre><code class="language-cpp"> class A { int a; }; class B { int b; }; class C:public A, public B { int c; }; class D:public C { int d; }; </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: Multilevel Inheritance - Quiz No.2.
Does following code show multiple inheritance?
class A { int a; }; class B { int b; }; class C:public A, public B { int c; }; class D:public C { int d; };
Yes, class C and class D
Yes, All together it’s multilevel
No, 4 classes are used
No, multiple inheritance is used with class A, B and C