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.

a. Yes.

Computer Science & Information Technology

You might also like to view...

By default, AutoCorrect automatically resizes the font of text you type as a title to fit the size of the title text placeholder

Indicate whether the statement is true or false

Computer Science & Information Technology

_______ is an imaging process that shows soft tissue using high-frequency sound waves and echoes

a. Ultrasound b. Computed tomography c. Magnetic resonance imaging d. Positron emission tomography

Computer Science & Information Technology