C examples for Data Type:enum
You can convert an enumerated constant to an integer.
An integer can also be converted back into an enum variable.
int i = RED; enum color c = i;
To suppress this warning an explicit type cast can be used.
enum color c = (enum color)i;