Program finds words with the same secend and third to last letter from file using dynamic memory allocation