Print either Fruit, Drink, or Unknown (followed by a newline) depending on the value of userItem. Print
Fantastic news! We've Found the answer you've been seeking!
Question:
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 <stdio.h>
int main(void) {
enum GroceryItem {GR_APPLES, GR_BANANAS, GR_JUICE, GR_WATER};
enum GroceryItem userItem = GR_APPLES;
/* Your solution goes here */
return 0;
}
Related Book For
Concepts in Federal Taxation
ISBN: 9780324379556
19th Edition
Authors: Kevin E. Murphy, Mark Higgins, Tonya K. Flesher
Posted Date: