Constructor behaviour in runtime polymorphism
<p>We know the need for a virtual destructor.</p>

<pre><code>Base *bptr = new Derived();
delete bptr;
</code></pre>

<p>If a derived class object is pointed by a base class pointer and when the object goes out of scope, only the Base class destructor gets called unless the destructor is virtual.</p>

<p>I am wondering how does the constructor work properly in this case.
Since the Base pointer points to the Derived object, only the Base constructor should have got called. How is it calling the derived class constructor properly.</p>

<p>Please explain me the reason behind this.</p>
