Answer:
Option (d)
Step-by-step explanation:
More specifically class B's object name will be there which would be
obj.funcname();
where obj is object of class B. If we need to call overridden method of class D then object of class D should be made. For example :
#include <iostream>
using namespace std;
class B
{
public:
void print()
{
cout<<"class B";
}
};
class D : public B
{
public:
void print()
{
cout<<"class D";
}
};
int main()
{
B obj;
obj.print(); //option d
return 0;
}
Options a and b are wrong as it is no way of calling a class's method and option c would call the overridden method of derived class.