#include <stdio.h>
int main()
{
char apple[]="Apple";
char banana[]="Banana";
char orange[]="Orange";
printf("Choose one of the below options\n\n");
printf("Which fruit do you like the most: Apple, Banana, Orange\n\n");
scanf("%s",&apple,&banana,&orange);
if("%s", apple)
{
printf("You chose Apple.\n");
}
if("%s",banana)
{
printf("You chose banana.\n");
}
}
// I want the code to simply print on screen the choice i chose. But when i run the code it prints both Apple and Banana. If i type Apple i do not want it to print Banana. Do i need to use else statement with this? or what else am i missing? Thank you i am very new to c programming.