Menu

(Solved) : Challenge Activity 4111 Enumerations Grocery Items Print Either Fruit Drink Unknown Follow Q37283110 . . .

CHALLENGE ACTIVITY 4.11.1: Enumerations: Grocery items Print either Fruit, Drink, or Unknown (followed by a newline) dep

CHALLENGE ACTIVITY 4.11.1: Enumerations: Grocery items Print either “Fruit’, “Drink, or “Unknown” (followed by a newline) depending on the value of userltem. Print “Unknown” (followed by a newline) if the value of userltem does not match any of the defined options. For example, if userltem is GRAPPLES, output should be: Fruit 1 #include <stdio.h> 1 test passed 3 int main(void) 4enum GroceryItem [ 6 7userItemGR APPLES; 9/* Your solution goes here */ IGR APPLES, GR.BANANAS, GR JUICE, GR WATER); enum GroceryItem userItem; All tests passed 10 11 return 12 Run Feedback? Show transcribed image text CHALLENGE ACTIVITY 4.11.1: Enumerations: Grocery items Print either “Fruit’, “Drink, or “Unknown” (followed by a newline) depending on the value of userltem. Print “Unknown” (followed by a newline) if the value of userltem does not match any of the defined options. For example, if userltem is GRAPPLES, output should be: Fruit 1 #include 1 test passed 3 int main(void) 4enum GroceryItem [ 6 7userItemGR APPLES; 9/* Your solution goes here */ IGR APPLES, GR.BANANAS, GR JUICE, GR WATER); enum GroceryItem userItem; All tests passed 10 11 return 12 Run Feedback?

Expert Answer


Answer to CHALLENGE ACTIVITY 4.11.1: Enumerations: Grocery items Print either “Fruit’, “Drink, or “Unknown” (followed by a newline…

OR