subject

Enum fruit_tag { BLUEBERRY,
BANANA,
PINEAPPLE,
WATERMELON
};
typedef enum fruit_tag fruit_t;
void printFruit(fruit_t myFruit) {
switch(myFruit) {
case BLUEBERRY:
printf("a blueberry");
break;
case BANANA:
printf("a banana");
break;
case PINEAPPLE:
printf("a pineapple");
break;
case WATERMELON:
printf("a watermelon");
break;
}
}
void compareFruit(fruit_t fruit1, fruit_t fruit2) {
if (fruit1 > fruit2) {
printFruit(fruit1);
printf(" is larger than ");
printFruit(fruit2);
}
else {
printFruit(fruit1);
printf(" is smaller than ");
printFruit(fruit2);
}
}
int main(void) {
fruit_t myFruit = PINEAPPLE;
fruit_t otherFruit = BLUEBERRY;
compareFruit(myFruit, otherFruit);
return 0;
What is the output?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:50
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
question
Computers and Technology, 23.06.2019 05:20
What did creator markus “notch" persson initially call his game
Answers: 1
question
Computers and Technology, 23.06.2019 10:30
Would a ps4 wired controller work on an xbox one
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
You know the right answer?
Enum fruit_tag { BLUEBERRY,
BANANA,
PINEAPPLE,
WATERMELON
};
typedef...
Questions
question
Mathematics, 30.12.2019 19:31
question
Chemistry, 30.12.2019 19:31
question
Biology, 30.12.2019 19:31