Google News
logo
CPP - Quiz(MCQ)
What is the order of Constructors call when the object of derived class B is declared, provided class B is derived from class A?
A)
Constructor of A only
B)
Constructor of B only
C)
Constructor of A followed by B
D)
Constructor of B followed by A

Correct Answer :   Constructor of A followed by B


Explanation : Firstly the Constructor of class A is called then class B because the Constructor of the base class is called before derived class.

Advertisement