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()
You might also like to view...
An unauthorized person can be prevented from viewing a presentation by adding a(n) ________
Fill in the blank(s) with correct word
Which of the following memory module types typically features memory with CL7 or CL9 timing?
a. SDRAM b. DDR c. DDR3 d. DDR2