File Handling
摘要
All variables used in a program are kept in the main memory and they are volatile, i.e., their values are lost when the program ends. Even if you write a program that runs forever, your data will be lost in case of a shutdown or power failure. Another drawback of the main memory is the capacity limitation. In the extreme case, when you need more than a couple of gigabytes for your variables, it will be difficult to keep all of them in the main memory. In particular, infrequently required data is better kept on an external storage device instead of the main memory.