program readdata(input, output, inputfile);
var inputfile : file of char; temp : array[1..10] of char;
begin reset(inputfile, 'test'); read(inputfile, temp); writeln(temp); close(inputfile); end.
try for i := 1 to 10 do read(InputFile, temp[i]); as your file is of type char, not temp. Also, I am not sure out of hand wether gpc allows writing to a file opend with Reset. Check the docs.