Question: Programming in C: Print either Fruit, Drink, or Unknown (followed by a newline) depending on the value of userItem. Print Unknown (followed by a newline)

Programming in C:Programming in C: Print either "Fruit", "Drink", or "Unknown" (followed by a

Print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unknown" (followed by a newline) if the value of userItem does not match any of the defined options. For example, if userItem is GR_APPLES, output should be: Fruit #include int main(void) {enum GroceryItem {GR_APPLES, GR_BANANAS, GR_JUICE, GR_WATER}; enum GroceryItem userItem = GR_APPLES;/* Your solution goes here */return 0;}|

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!