This is because your string contains the newline character.
From the fgets
documentation:
A newline character makes fgets stop reading, but it is considered a valid character by the function and included in the string copied to str.
This should fix the problem (demo):
#include <stdio.h>
#include <string.h>
char animals[][20] = {
"dogs are cool",
"frogs are freaky",
"monkeys are crazy"
};
int main() {
char input[10];
printf("Enter animal name: ");
scanf("%9s", input);
int i;
for(i = 0; i < 3; i++) {
if(strstr(animals[i], input))
printf("%s", animals[i]);
}
return 0;
}