The C standard grants the freedom to use different integer types to represent different enumeration types, but most compilers just use int to represent all enumeration types . Treating enumerations as just integers leads to some useful behaviors.
Read moreCan enum store numbers?
Instead you can have integer values to the elements of an enum.6 Ağu 2019
Read moreCan Java enums be numbers?
Not directly as you’ve written, i.e., where an enum value equals a number, but yes indirectly as shown in Ben S’s link.
Read more