Enumeration is a basic data type in C language, not a data structure
Used to declare a set of constant 1. How to enumerate variables in 3 A. Define the type first, and then define the variable B. Define both the type and the variable C. Anonymous definition enum Season {spring, Summer, Autumn, winter};enum Season s = spring; Variable names that have been positioned as enumerations cannot be used as other variable int Spring = 44;//error 2. The default value is a positive integer value from 0 to n enum {Spring, Summer, autumn=11, winter=55}; The same value is not recommended Directly using the enumeration value name, is actually the integer data printf ("%d\n", Summer);//2 The default value is an integer that increments from 0, and if an enumeration value is specified, the next default enumeration value is incremented from this value.
[C language-8] enum enum