Solved

Employee Is a Base Class and HourlyWorker Is a Derived

Question 11

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

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents