Tagged: Enumerator

1

Programming in C: Enumerations, Bit-Fields, and Unions

Enumerations allow us to specify identifiers for integer values without having to specify a long list of global variables or constants. We also covered unions, which are a bit more esoteric, but useful anyway. Sometimes we need to access an array of long ints as individual char bytes, with a union you can do that!  Lastly, we rounded-up with bit-fields: a C programming built-in that allows us to identify and work with specific bits by name.