Social Sciences, asked by Alamkhan2634, 1 year ago

Why child class destructor is called before base class destructor?

Answers

Answered by Avanish010
1
 The derived class must be constructed after the base class so that the derived classconstructor can refer to base class data. For the same reason, the derived class destructor must runbefore the base class destructor. It's very logical: we construct from the inside out, and destroy from the outside in.
Answered by Anonymous
0
ANSWER
............


1. BECAUSE IT IS CONSTRUCT AFTER THE BASE CLASS
.......

THAT IS WHY IT IS DERIVED FROM THE CLASS DATA
Similar questions