6.10. Working with Files

When you open a file, check that there was not an error. [FILE-OPEN: 1-5 points]

An attempt to open a nonexistent file should be caught, not ignored.

Always close an open file that has been opened by your program. [FILE-CLOSE: 1-4 points]

If you do not close a file, it remains open until your program terminates.