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...

Answer the following statements true (T) or false (F)

1. Changing a control's Text property also changes how you refer to the control in code 2. You can display the Properties window by pressing 3. The Properties window is used to change how objects look and react. 4. When working with text boxes, the sizing handles allow you to resize the object by dragging to make it wider or narrower. 5. Once a text box control is placed on a form, it cannot be resized or moved.

Computer Science & Information Technology

Which of these domain controller roles need to pull changes form an RODC?

a. PDC emulator b. RID master c. Global catalog server d. None of the above.

Computer Science & Information Technology

Which of the following is a port used by TCP and UDP?

a. 23 Telnet b. 25 SMTP c. 53 DNS d. 69 TFTP

Computer Science & Information Technology

To make your code easier to read, you can use a link shortener. _________________________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology