Suppose this is embedded in an otherwise correct and complete program. Which version of f() will be called?
Suppose class D is derived from class B, and class B has a public member function whose declaration is void f();. Suppose class D has its version of the function, void f(). Here is a pointer definition and an access to a member function..
```
B* bPtr = new D;
BPtr->f();
```
a) D::f()
b) B::f()
c) This is illegal. You can’t assign a D object to a variable of type pointer to B.
b) B::f()
When the functions are not virtual, and access is made through a pointer or a reference (here a pointer) the function called follows the type of the pointer.
You might also like to view...
The ________ action is used to put the focus on a specified database object so that an action can be applied to that object
Fill in the blank(s) with correct word
You should use cell references in formulas instead of constant values so
A) you can change the input values without changing the formulas. B) you can easily include letters, numbers, and spaces. C) it is easier to debug the errors. D) you can control the sequence in which Excel performs arithmetic operations.