
13-24
Computer Programming with C
Explanation:
e above program is the same as the previous one. Only the member variables and bits
assigned are dierent.
13.10 ENUMERATED DATA TYPE
e enum is a keyword. It is used for declaring enumeration types. e programmer can create his/
her own data type and dene what values the variables of these data types can hold. is enumeration
data type helps in reading the program.
Consider the example of 12 months of a year.
enummonth{Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec};
is statement creates a user-dened data type. e keyword enum is followed by the tag name
month. e enumerators ...