Please help me with this code fragment.

for(;;)
{
/* check array with strcmp */
for (array_counter=0; array_counter<=10; array_counter++)
{
if (strcmp(user, words[array_counter]) == 0)
{
printf("DUPLICATE \"%c\"", user);
break;
}
else
strcpy(words[array_counter], user);
}
}

It is supposed to compare a user-entered string with an array of strings. If it is already in the array, the DUPLICATE message should print. If not, it should add it to the list.

When I run the program, it accepts the user string and then goes into an endless loop printfing (DUPLICATE " over and over again.

Any advice you can give would be helpful. Thank you.