C++ Programming :: Virtual Function

NA
SHSTTON
8
Solv. Corr.
5
Solv. In. Corr.
13
Attempted
0 M:0 S
Avg. Time

1 / 6

Choose the correct option.

A virtual function that has no definition within the base class is called____________.


APure virtual function

BPure static function

CPure Const function

DFriend function

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
13
Solv. Corr.
6
Solv. In. Corr.
19
Attempted
0 M:0 S
Avg. Time

2 / 6

Choose the correct option.

If a class contains pure virtual function, then it is termed as____________________ .


AVirtual class

BSealed class

CPure Local class

DAbstract Class

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
14
Solv. Corr.
9
Solv. In. Corr.
23
Attempted
0 M:0 S
Avg. Time

3 / 6

Choose the correct option.

Which of the followings are true about Virtual functions?


AThey must be non-static member function of the class

BThey cannot be friends

CConstructor Functions cannot be virtual

DAll of these

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
11
Solv. Corr.
7
Solv. In. Corr.
18
Attempted
0 M:0 S
Avg. Time

4 / 6

Choose the correct option.

Syntax for Pure Virtual Function is ______________ .


Avirtual void show()==0

Bvoid virtual show()==0

Cvirtual void show()=0

Dvoid virtual show()=0

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
18
Solv. Corr.
1
Solv. In. Corr.
19
Attempted
0 M:0 S
Avg. Time

5 / 6

Choose the correct option.

_______________ is a member function that is declared within a base class and redefined by derived class.


Avirtual function

Bstatic function

Cfriend function

Dconst member function

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
3
Solv. Corr.
14
Solv. In. Corr.
17
Attempted
0 M:0 S
Avg. Time

6 / 6

Choose the correct option.

Which of the following keyword supports dynamic method resolution?


Aabstract

BVirtual

CDynamic

DTypeid

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace