First of all you have to zero-initialize the array
char words[100][16] = {};
This loop
for (i = 0; i < 100; i++)
{
if (strcmp(token, words[i]) == 0)
{
unique = false;
break;
}
}
should be changed to
for (i = 0; i < h; i++)
{
if (strcmp(token, words[i]) == 0)
{
unique = false;
break;
}
}
This code snippet
while (token != NULL)
{
token = strtok(NULL, " .");
// ...
has to be substituted for
while ( ( token = strtok(NULL, " .") ) != NULL)
{
// ...
I think that it is the main reason of the program crash.
Also you do no check whether there are more unique words in the file than the size of the array and whether the size of a token is greater than the second size of the array.