Q:

Which among the following is correct for the following code?

0

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{ };
};

  1. Multi-level inheritance is used, with nested classes
  2. Multiple inheritance is used, with nested classes
  3. Single level inheritance is used, with enclosing classes
  4. Single level inheritance is used, with both enclosing and nested classes

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

(d).Single level inheritance is used, with both enclosing and nested classes

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

OBJECT ORIENTED PROGRAMMING INHERITANCE AND ITS TYPES MCQ

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Which among the following is false?... >>
<< If 6 classes uses single level inheritance with pa...