Base and Derived Class Randomization

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.