In your own wordsQuestion 1 · Recall
Loading…
By the end you can explain why files are needed (persistence, sharing, large data), and write pseudocode to handle text files using OPENFILE, READFILE, WRITEFILE, CLOSEFILE and EOF.
Files provide persistent storage. That means the data survives when the program stops.
| Reason | Explanation |
|---|---|
| Persistence | Variables live in RAM and are lost when the program ends. Files stay on disk. |
| Large datasets | A file can hold more data than fits in memory at one time. |
| Sharing | Several programs can read or write the same file. |
| Backup and transfer | Files can be copied, emailed or archived. |
| Interoperability | Standard formats such as CSV and plain text work across systems. |
Text files store human-readable characters, organised as lines. Each line ends with a newline character.