Question: Which version of the print function would be invoked by the code: Person* x = new Student; x->print (); class Person { ... };
Which version of the print function would be invoked by the code: Person* x = new Student; x->print (); class Person { ... }; public: void print () const; class Student public Person { ... }; public: void print () const;
Step by Step Solution
There are 3 Steps involved in it
In C when a base class pointer points to a derived class object and a ... View full answer
Get step-by-step solutions from verified subject matter experts
