Assume that we have constructor functions for both the base class and the…
UGC NET 2012
Assume that we have constructor functions for both the base class and the derived class. Now consider the following declaration inside main():
Base *P = new Derived;In what sequence will the constructors be called?
- A.
Derived class constructor followed by Base class constructor.
- B.
Base class constructor followed by derived class constructor.
- C.
Base class constructor will not be called.
- D.
Derived class constructor will not be called.
Attempted by 39 students.
Sign up free to check your answer
Sign up freeLoading lesson…

