Multiple choice technology programming languages

The default type of enum is integer and has a default value 1

  1. True

  2. False

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

In C#, the default underlying type of enum members is int, but the default value of the first enum member is 0, not 1. Unless explicitly assigned, enum constants start at 0 and increment by 1. For example: enum Color { Red, Green, Blue } means Red=0, Green=1, Blue=2. The statement incorrectly claims the default value is 1.