To prevent a class from being inherited, we declare it as _______.
- final
- static
- private
- mutable
In C++, the "final" keyword is used to prevent a class from being inherited. This means that no other class can be derived from a class declared as "final".
Loading...
Related Quiz
- The friendship granted by a class A to a function or class B is _______ reciprocal, meaning [choose the correct statement].
- A _______ is a smart pointer that owns and manages another object through a pointer and disposes of that object when the _______ goes out of scope.
- Which file opening mode in C++ will allow you to append data at the end of the file’s content?
- You are designing a class that will be widely used across a large project. The class will often be copied and assigned to other instances. What considerations related to constructors and assignment operators should be taken into account to ensure efficient and correct operation?
- An application performs arithmetic operations on various data types without modifying existing code. Which concept facilitates this?