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


a) D::f()

Computer Science & Information Technology

You might also like to view...

What is a hybrid cloud?

A) A splicing of cloud components that make up desktop as a service B) A combination of a public cloud and a private cloud C) A new structure for business intelligence data that uses Microsoft Excel Services D) The new term for a modern datacenter

Computer Science & Information Technology

Data stores are used to store:

A) all base elements and some derived elements. B) all derived elements and some base elements. C) all base and derived elements. D) only some base elements and some derived elements (the most critical ones in the system).

Computer Science & Information Technology

The gray area surrounding the Stage is known as the ____.

A. Pasteboard B. frame C. Workspace D. Timeline

Computer Science & Information Technology

An (

A) ________ cell reference provides a permanent reference to a specific cell.

Computer Science & Information Technology