When an object of a class is defined inside another class then,
► Destructor of enclosing class will be called first
► Destructor of inner object will be called first
► Constructor and Destructor will be called simultaneously
► None of the given option
I am agree with Rana AQ, here is bit description in support of it
Ref
Lesson 40
complete process will be like this in this case
first constructor of inner object will be called then constructor of enclosing class.
Because until inner object is not initialized enclosing class can not understand the memory allocation and structure of inner object.
In case of destructor it will be in reverse order(first Destructor of encolsing class will be called and then destruct or of object will be called).
I am agree with Rana AQ, here is bit description in support of it
Ref
Lesson 40
complete process will be like this in this case
first constructor of inner object will be called then constructor of enclosing class.
Because until inner object is not initialized enclosing class can not understand the memory allocation and structure of inner object.
In case of destructor it will be in reverse order(first Destructor of encolsing class will be called and then destruct or of object will be called).