matrix.c I/O updated to match the criteria.