Solved

Employee Is a Base Class and HourlyWorker Is a Derived

Question 2

Multiple Choice

Employee is a base class and HourlyWorker is a derived class, with a redefined non-virtual print function. Given the following statements, will the output of the two print function calls be identical? HourlyWorker h;
Employee *ePtr = &h;
EPtr->print() ;
EPtr->Employee::print() ;


A) Yes.
B) Yes, if print is a static function.
C) No.
D) It would depend on the implementation of the print function.

Correct Answer:

verifed

Verified

Related Questions