Computer Science - Object Oriented Programming Using C++ - Discussion

9. 

When you create a derived class and instantiate an object _____

[A]. the parent class object must be constructed first
[B]. the child class object must be constructed first
[C]. the parent class object must not be constructed
[D]. the child class object must not be constructed

Answer: Option A

Explanation:

No answer description available for this question.

Madhuri Kumawat said: (Jun 18, 2014)  
Its wrong. We don't create object of parent class, because parent class is called using child class object. Option B is correct.

Ayaz said: (Jun 17, 2015)  
Yes parent class will called automatically when child class object is created.

Varu said: (Mar 7, 2016)  
Only child class object will be created.

Himani said: (May 26, 2017)  
I think the answer is B.

Mzr Rao said: (Dec 30, 2017)  
Here is not about calling. Question is about object construction, so first object will be construct of parent class and then child class.

Saba said: (Apr 14, 2020)  
Here is not about calling. Question is about object construction, so first object will be construct of parent class and then child class.

When you create a derived class and instantiate an object the parent class object must be constructed first.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.