Dont use gets(), use fgets() instead.
For comparing strings use the strcmp() function.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char usrAnimal[50];
char *p; //will help us to remove \n from string
char *pet_names[] = {
"cat",
"dog"
};
//get user animal and compare it with pet names
printf( "Enter animal: " );
fgets ( usrAnimal, sizeof (usrAnimal), stdin);
//remove the \n from the string, fgets added it
p = strchr( usrAnimal, '\n' );
if (p) *p = '\0';
//compare and see if they're equals
if (strcmp(usrAnimal,pet_names[0]) == 0)
printf("%s and %s are equals\n",usrAnimal,pet_names[0]);
else
printf("They're are different\n");
//pause and exit
system("PAUSE");
return 0;
}