Computers and Technology

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?

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 08:30, Calirose
When you interpret the behavior of others according to your experiences and understanding of the world your evaluation is
Answers: 1
image
Computers and Technology, 23.06.2019 21:20, nathanfletcher
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
image
Computers and Technology, 24.06.2019 17:50, veneciaconton347
You will subnet the network address 172.31.103.0/24. the network has the following requirements: · room-114 lan will require 27 host ip addresses · room-279 lan will require 25 host ip addresses · room-312 lan will require 14 host ip addresses · room-407 lan will require 8 host ip addresses how many subnets are needed in the network topology?
Answers: 2
image
Computers and Technology, 25.06.2019 01:00, jimmymurray29
When a new name is registered on the internet, the process can take two hours to four hours four hours to three days two hours to two days one hour to eight hours
Answers: 1
Do you know the correct answer?
Enum fruit_tag { BLUEBERRY,
BANANA,
PINEAPPLE,
WATERMELON
};
typedef...

Questions in other subjects: