Computer Science - Object Oriented Programming Using C++ - Discussion
Discussion Forum : Object Oriented Programming Using C++ - Section 2 (Q.No. 9)
9.
When you create a derived class and instantiate an object _____
Discussion:
6 comments Page 1 of 1.
Saba said:
3 years ago
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.
When you create a derived class and instantiate an object the parent class object must be constructed first.
Mzr Rao said:
5 years ago
Here is not about calling. Question is about object construction, so first object will be construct of parent class and then child class.
Himani said:
6 years ago
I think the answer is B.
Varu said:
7 years ago
Only child class object will be created.
Ayaz said:
8 years ago
Yes parent class will called automatically when child class object is created.
Madhuri Kumawat said:
9 years ago
Its wrong. We don't create object of parent class, because parent class is called using child class object. Option B is correct.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers