Q:

Which method in the code below is single level inherited?

0

Which method in the code below is single level inherited?

class A
{
 protected int a, b;
 public: void show()
 { 
  cout<<a<<b;
 }
};
class B: public A
{
 public: void disp()
 { 
  cout<<a++<<b++; 
 }
};
class C: private A, public B
{
 void avg()
 { 
  cout<<(a+b)/2; 
 }
};

  1. Class A
  2. Class B
  3. Class C
  4. None

All Answers

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

(b).Class B

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
If single level inheritance is used and an abstrac... >>
<< Single level inheritance supports _____________ in...