C FAQ's
C FAQ's
Enumeration is a data type. We can create our own data type and define values that the variable can take. This can help in making program more readable. enum definition is similar to that of a structure. Example: consider light_status as a data type. It can have two possible values - on or off. enum light_status { on, off }; enum light_status bulb1, bulb2; /* bulb1, bulb2 are the variables */