In C++, an enum can be used to create _______.
- classes
- named constants
- functions
- variables
In C++, an enumeration (enum) is a user-defined data type that consists of integral constants. By default, the first enumerator has the value 0, and the value of each successive enumerator is increased by one. They are essentially a way to create named integral constants.
Loading...
Related Quiz
- What is the effect of the continue statement inside a for loop?
- The ASCII value of 'A' in decimal is _______.
- The expression a×b can be represented as a _______ b in C++.
- What is the use of a catch block with an ellipsis (...)?
- What is the maximum number of conditions that can be nested within each other using nested if-else structures?