A Person object x is created as a Student. When calling x.print(), Student::print() would be invoked as it overrides the virtual print() function defined in the base Person class.
Given the definitions of class Person and class Student show.pdf
1. Given the definitions of class Person and class Student shown below, which version of the print
function would be invoked by the statement x> print ();. Person x= new Student; x> print (); class
Person { a public: virtual void print() const; }; class Student : public Person { public: void print()
const; } Person::print() No function gets called, this causes a compile-time error void print ()
Student::print()