Module 13 · Files
Reading and Writing Text Files
Free with an accountReading
Every evening Maria's till program writes one line: the day, and how many sales it made. She wants a log, a list that grows by one line a day.
Checking what this lesson needs for you…
What is inside Reading and Writing Text Files
- Write lines, then read them back
- fgets keeps the newline
- Append mode: the log grows at the end
- The file position, and rewind
- One function for a file and for stdin