#include #include #include #define N 256 int main() { char food[N]; printf("What would you like to eat? "); if (fgets(food, N, stdin) != food) { printf("End of input encountered.\n"); return EXIT_FAILURE; } printf("You can't eat that--"); if (strstr(food, "sugar") == NULL) { printf("it turns to sugar in your stomach!\n"); } else { printf("it has sugar in it!\n"); } return EXIT_SUCCESS; }