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 concept does an array of pointers to functions support?

  1. Dynamic linking

  2. Inheritance

  3. Polymorphism

  4. Table-driven code

The correct answer is: Table-driven code

An array of pointers to functions supports the concept of table-driven code. This is because it allows for a program to call different functions based on their position in the array, making it a powerful tool for organizing and controlling different sets of functions. This is different from dynamic linking, which allows a program to call functions from a shared library during runtime, and from inheritance and polymorphism, which are concepts in object-oriented programming that allow for code reuse and flexibility in implementation. Therefore, while options A, B, and C may seem related to pointers and functions, they do not specifically support the concept of an array of pointers to functions.