Question: When a derived class object is created, in what order are the constructor bodies executed? First the derived class constructor body is executed, then the

When a derived class object is created, in what order are the constructor bodies executed?

First the derived class constructor body is executed, then the base class constructor body is executed.

First the base class constructor body is executed, then the derived class constructor body is executed.

Only the base class constructor body is executed.

Only the derived class constructor body is executed.

A base class pointer that points to a derived class object can be used to call

only methods declared in the derived class.

only methods declared in the base class.

any method declared in either the base class or the derived class.

any method in any class included in your program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!