typedef enum choices {left, left_center = 2, right_center, right = 5} choices
Answers
Answered by
1
Answer:
Explanation:
// Define a new enumeration named Color
enum Color
{
// Here are the enumerators
// These define all the possible values this type can hold
// Each enumerator is separated by a comma, not a semicolon
color_black,
color_red,
color_blue,
color_green,
color_white,
color_cyan,
color_yellow,
color_magenta, // there can be a comma after the last enumerator, but there doesn't have to be a comma
}; // however the enum itself must end with a semicolon
// Define a few variables of enumerated type Color
Color paint = color_white;
Color house(color_blue);
Color apple { color_red };
Similar questions