In reply to prasham98:
The base class handle b1 is pointing to derived class object d1, so b1.a & b1.b prints the values of child class object which are inherited from base class.
In reply to prasham98:
The base class handle b1 is pointing to derived class object d1, so b1.a & b1.b prints the values of child class object which are inherited from base class.