You'll need #include <string.h>
to use strstr()
like this:
#include <stdio.h>
#include <string.h>
int main() {
char str[100];
printf("How are you feeling right now? ");
fgets(str, sizeof(str), stdin);
if (strstr(str, "good") != NULL)
printf("I'm glad to hear that!\n");
else if (strstr(str, "tired") != NULL)
printf("Take some rest!\n");
else
printf("Thank you for sharing.\n");
return 0;
}