Question
1.
#include
2.
using namespace std;
3.
class sample
4.
{
5.
public:
6.
virtual void example() = 0;
7.
};
8.
class Ex1:public sample
9.
{
10.
public:
11.
void example()
12.
{
13.
cout example();
33.
}
What is the output of this program?
1.
#include
2.
using namespace std;
3.
class sample
4.
{
5.
public:
6.
virtual void example() = 0;
7.
};
8.
class Ex1:public sample
9.
{
10.
public:
11.
void example()
12.
{
13.
cout example();
33.
}
Answer: Option C
Was this answer helpful ?
In this program, We are combining the two statements from two classes and printing it by
using abstract class.
Output:
$ g++ abs3.cpp
$ a.out
ubuntu is awesome
Was this answer helpful ?
More Questions on This Topic :
Question 4.
Which is also called as abstract class?
....
Submit Solution