Can a pure virtual function have a body?
Explanation
Yes, it can. One can call this function either by referring to it in the constructor/destructor of an abstract class or directly - in overridden function of descendant one can call the pure virtual function with the body of ancestor through the scope resolution operator.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes