Page 1 of 1

Given below classes which of the following are the possible row entries in vtable of Base class?

Posted: Wed Jul 13, 2022 7:53 pm
by answerhappygod
class Base
{
public:
virtual void function1() {};
virtual void function2() {};
};
class D1: public Base
{
public:
virtual void function1() {};
};
class D2: public Base
{
public:
virtual void function2() {};
};
a) Base::function1() and Base::function2()
b) Base::function1() and D1::function2()
c) D1::function1() and Base::function2()
d) D1::function1() and D1::function2() or D2::function1() and D2::function2()