Which Among The Following Is Correct For The Following Codep #727

Which among the following is correct for the following code?</p> <pre><code class="language-cpp"> class A { public : class B { public : B(int i): data(i) { } int data; } }; class C: public A { class D:public A::B{ }; }; </code></pre>

Online Quiz 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 among the following is correct for the following code?

 class A { public : class B { public : B(int i): data(i) { } int data; } }; class C: public A { class D:public A::B{ }; }; 

Similar question(s) are as followings:



Online Quizzes of gs111 OOP Object Oriented Programming Java

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background