Exercise 24 with scanf fscanf gets fgets and other I/O functions