...

/

Quiz

Quiz

Let's check your understanding of the Inheritance.

Technical Quiz
1.

What will be the output of following piece of code?

class Base {
  public:
  Base(){ 
    cout << "Base constructor!" << endl; 
  }
};

class Derived: public Base {
  public:
  Derived(){
    cout << "Derived constructor!" << endl;  
  }
};

int main(){
  Derived d;
}


A.

Derived constructor!

B.

Derived constructor!
Base constructor!

C.

Base constructor!
Derived constructor!

D.

None of the above


1 / 10