title: Virtual Table and Object Slicing
body: <p>In object slicing,when a derived class object is copied to a Base class object , does the _vptr of Derived class also gets copied to _vptr of Base class like other members of class Base?.If not why?</p>
  
  <pre><code>class Base{  
  public :
  virtual void Display(){cout&lt;&lt;"In Base"&lt;&lt;endl;}
   };
  class Derived:public Base{
  public:
  void Display(){cout&lt;&lt;"In Derived"&lt;&lt;endl;}
  
  };
  int main()
  {
  Derived objD;
  Base objB;
  objB = objD;
  objB.Display();
  }
  </code></pre>
  
  <p>I have observed the following result for the above snippet.</p>
  
  <pre><code>Output
  In Base
  </code></pre>