Mastering C++: A Comprehensive Quiz Based on 'Thinking in C++'

Disable ads (and more) with a membership for a one time $2.99 payment

Test your C++ skills with our quiz based on Bruce Eckel's 'Thinking in C++'. Dive into object-oriented programming, advanced topics, and fundamentals. Perfect for learners and experts alike. Assess your knowledge and become a C++ master!

Practice this question and more.


What kind of functions must be implemented in a derived class if it inherits from an abstract base class with pure virtual functions?

  1. Static functions

  2. All base class functions

  3. All pure virtual functions

  4. Inline functions

The correct answer is: All pure virtual functions

When inheriting from an abstract base class with pure virtual functions, the derived class must implement all of the pure virtual functions in order to be considered a concrete class and able to be instantiated. Options A, B, and D are incorrect because static, base class, and inline functions are not required to be implemented in the derived class as they are already provided by the base class. Additionally, option B is incorrect because not all functions in the base class are necessarily pure virtual.