C examples for Data Type:enum
You can create variables of an enumeration type without specifying a tag, so there's no enumeration type name.
Because there is no type name, there's no way to define additional variables of this type later in the code.
#include <stdio.h> int main(void) { enum {red, orange, yellow, green, blue, indigo, violet} shirt_color; shirt_color = red;//from w w w . ja va 2s . c om printf("%d\n",shirt_color); return 0; }