You are only comparing the current row with the next. Change the loop with strcmp to:
for(x=0; x<20; x++) {
for(y=x+1; y<20; y++) {
if (strcmp (words_array[x], words_array[y])==0)
pairs++;
}
}
This will find five pairs in your sample data:
Google
Twitter
Facebook
Flyer
grill
On a side note you might want to add a defined constant for the number of rows at the beginning of the program (between the #includes and main) so you don't have to replace the 20
everywhere if you want to change the number of lines read (and of course the same can be said for the word length):
#define MAXLINES 20
#define MAXLENGTH 17
and then you can use those constants everywhere you now have 20 and 17.