I wrote this function to read a line from a file:
const char *readLine(FILE *file) { if (file == NULL) { printf(\"Error: file pointer is null.\"
Use fgets() to read a line from a file handle.