Which of the following is the version of func that is called?

Suppose we have a class D derived from base class B,
```
class B
{
public:
// other members
void func();
// other members
};
void B::func() { /* body */}
class D: public B
{
public:
// other members
void func();
// other members
};
void D::func() { /* body */}
D dObj;
```

Make the following call using dObj as calling object:
dObj.func();

a)B::func()
b) D::func()
c) Neither
d) Both
e) This is illegal. The base class func() is inherited in the derived class. For this reason, it is illegal to have a function defined in a base class and in a derived class having the same signature.


b) D::func()

Computer Science & Information Technology

You might also like to view...

The ____ feature automatically corrects typing, spelling, capitalization, or grammar errors as you type them.

A. AutoEntry B. AutoCorrect C. AutoAdd D. AutoSpell

Computer Science & Information Technology

When a pair of OSPF neighbors has reached the ________ state, they can exchange their LSDB with each other

A) Loading B) Down C) Init D) 2-way

Computer Science & Information Technology

What are the risks of the typical recovery options?

What will be an ideal response?

Computer Science & Information Technology

Match each of the following subtotal functions to its best description:I.SUMII.AVERAGEIII.MAXIV.MINV.COUNTA.The greatest valueB.Adds the values in the field togetherC.The least valueD.The number of valuesE.Adds the values in the field together and then divides by the number of values

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology