Computer Science, asked by snehasidharth834, 1 year ago

Destructor calls are made in which order of the corresponding constructor calls

Answers

Answered by dghyfunkjfx
0
Destructor are called in reverse order i.e if we have base class and derived class then first during constructor call base class constructor is called then derived class constructor call happen, but in case of destructor first derived destructor called then base class destructor call happen.

This is why because derived class pointer can't point to base class member so if first base class destructor is called then we are unable to use base class.
Similar questions