+ 3
A typedef creates an alias for a type. You can typedef a simple type or a more complicated user-defined type such as a struct, union, or enum, which otherwise would require syntax like âenum foo xâ. A typedef also allows more strict type-checking than just declaring something with, say, âstruct mystruct xxxâ.
An enum declaration allows new names and âvaluesâ to be defined and used in the code. In the days when C didnât have a standard âboolâ type, a common enum used to be.