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

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

Question: 1 / 575

What programming construct is suggested as inefficient because it often introduces new errors?

Operator overloading

Copying source code and modifying by hand

Copying source code and modifying by hand is suggested as inefficient because it involves manually copying and editing code, which can lead to new errors being introduced. This approach is prone to human error and can become time-consuming and complicated as the codebase grows. The other options, operator overloading, using inheritance for source code reuse, and dynamic memory allocation, are all legitimate programming constructs that serve different purposes and have their own advantages and disadvantages. However, they are not generally suggested as inefficient or error-prone.

Using inheritance for source code reuse

Dynamic memory allocation

Next

Report this question