All mock tests are FREE till 31 December — register to save your progress

Which of the following statements is TRUE?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. We can never build an object from a class containing a pure virtual function

Explanation

A class with a pure virtual function is abstract and cannot be instantiated. Virtual functions are exactly how run-time polymorphism through base pointers works, and a pure virtual function may still be given a body.

More Programming Languages and Computer Graphics questions