A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. 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 ?
a. Derived class constructor is followed by Base class constructor
b. Base class constructor is followed by Derived class constructor
c. Base class constructor is never called
d. Derived class constructor is never called
Answer:Base class constructor is followed by Derived class constructor
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here