Usually pure virtual function _____.

2018

Usually pure virtual function _____.

  1. A.

    has complete function body

  2. B.

    will never be called

  3. C.

    will be called only to delete an object

  4. 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.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs