THIS CHAPTER INTRODUCES YOU TO A data type that has not yet been described: the enumerated data type. You also learn about the
typedef statement, which enables you to assign your own names to basic data types or to derived data types. Finally, in this chapter you see the precise rules that are used by the compiler in the conversion of data types in an expression.
Wouldn’t it be nice if you could define a variable and specify the valid values that could be stored into that variable? For example, suppose you had a variable called
myColor and you wanted to use it to store one of the primary colors,
blue, and no other values. This type of capability is provided by the enumerated data ...