Allocation of array for reading strings from a text file

Thank you @Beliavsky. One very minor remark: the line

integer, parameter :: n = 10

was superfluous. Without that line the program still compiled, ran and gave the same output with gfortran and ifort.