When a derived class object is created, in what order are the constructor bodies
ID: 3834332 • Letter: W
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 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.
Explanation / Answer
when When a derived class object is created, First the base class constructor body is executed, then the derived class constructor body is executed
A base class pointer that points to a derived class object can be used to call any method declared in either the base class or the derived class.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.