C Language Enumerations enumeration constant without typename


Example

Enumeration types can also be declared without giving them a name:

  enum { buffersize = 256, };
  static unsigned char buffer [buffersize] = { 0 };

This enables us to define compile time constants of type int that can as in this example be used as array length.