Assume that we have constructor function for both Base and Derived classes.…

UGC NET 2013

Assume that we have constructor function for both Base and Derived classes. Now consider the declaration :

main ( )

Base *p = new Derived;

In what sequence, the constructor will be executed ?

  1. A.

    Derived class constructor is followed by Base class constructor.

  2. B.

    Base class constructor is followed by Derived class constructor.

  3. C.

    Base class constructor is never called.

  4. D.

    Derived class constructor is never called.

Attempted by 18 students.

Sign up free to check your answer

Sign up free

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs

Loading lesson…