The enum class introduces _______ scope to prevent enumerators from polluting the namespace.
- global
- restricted
- local
- strong
The enum class introduces "strong" scoping. This ensures that the enumerator names are not directly accessible without the name of the enumeration, thus preventing name clashes and polluting the global namespace.
Loading...
Related Quiz
- When dealing with complex conditions, it might be beneficial to use a _______ in conjunction with if-else structures to improve code clarity and maintainability.
- Imagine you are developing an e-commerce system where different types of users (Admin, Buyer, and Seller) exist. Which inheritance model might be beneficial to maintain, expand, and utilize polymorphic behavior?
- When a class B is inherited publicly from a class A, then the protected members of class A will become _______ in class B.
- Regarding memory alignment and data packing, which of the following is true for structs in C++?
- How does the logical AND (&&) operator behave when the first operand is false?