What value does an enumeration object have if it is set to a value not equal to any of its corresponding enumeration constants?
Consider the following code:
enum foobar{
FOO = 1,
BAR = 5
};
enum foobar baz = 5;
enum foobar qux = 42;
The variable is bazset to an integer value 5, and the variable is quxset to an integer value 42.
I suspect the variable bazwill contain a value BAR, but I'm not sure about the variable qux. No enumeration constant has been assigned a value 42, so what happens when a variable is enum foobarset to that value?
Is the C99 standard explicit for the result?