Usually pure virtual function _____.
2018
Usually pure virtual function _____.
- A.
has complete function body
- B.
will never be called
- C.
will be called only to delete an object
- D.
is defined only in derived class
Attempted by 288 students.
Show answer & explanation
Correct answer: D
Short answer: A pure virtual function is declared in a base class and must be defined (implemented) by derived classes to create concrete objects. Declaration syntax: virtual void func() = 0; — the "= 0" makes the function pure virtual.
A video solution is available for this question — log in and enroll to watch it.