Sail E0 Webinar
Question


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.
}
Options:
A .  ubuntu
B .  is awesome
C .  ubuntu is awesome
D .  None of the mentioned
Answer: Option C

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 ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers