Multiple choice

By default, which value is assigned to enumerated data type?

  1. 0

  2. 1

  3. -1

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In C and C++, enumerated data types (enums) assign integer values starting from 0 by default. The first enumerator gets value 0, the next gets 1, and so on sequentially. However, programmers can explicitly assign different values if needed. This default behavior makes enums useful for array indexing and creating named constants.