Question
1.
#include
2.
using namespace std;
3.
class Base
4.
{
5.
public:
6.
virtual void print() const = 0;
7.
};
8.
class DerivedOne : public Base
9.
{
10.
public:
11.
void print() const
12.
{
13.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
class Base
4.
{
5.
public:
6.
virtual void print() const = 0;
7.
};
8.
class DerivedOne : public Base
9.
{
10.
public:
11.
void print() const
12.
{
13.
cout
Answer: Option C
Was this answer helpful ?
In this program, 'Base' is an ambiguous base of 'Multiple'. So it is producing an error. And this
program is a virtual base class.
Was this answer helpful ?
More Questions on This Topic :
Question 4.
What is meant by multiple inheritance?
....
Submit Solution