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 followed by B
b) Constructor of B followed by A
c) Constructor of A only
d) Constructor of B only

1 thought on “What is the order of Constructors call when the object of derived class B is declared, provided class B is derived from class A?”

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

Leave a Comment