Categories
b. Variables and Keywords

enum

Enumeration types are declared in C programming using keyword enum. For example:

enum suit
{
    hearts;
    spades;
    clubs;
    diamonds;
};

Here, an enumerated variable suit is created having tags: heartsspadesclubs, and diamonds.

Leave a Reply

Your email address will not be published. Required fields are marked *