1.

Which is the correct syntax of defining a pure virtual function?(a) pure virtual return_type func();(b) virtual return_type func() pure;(c) virtual return_type func() = 0;(d) virtual return_type func();

Answer» Right answer is (c) virtual return_type func() = 0;

Easiest explanation - virtual return_type function_name(parameters) = 0; where {=0} is called pure specifier.


Discussion

No Comment Found

Related InterviewSolutions