- Lab 2: File Operations and Unbuffered I/O
Tasks for today:
- To get familiar with string operations
- To get familiar with file operations
- Write a program that reads test.txt in.
- Add 100 to the number in the file.
- Print out the new sum.
- $ cat test.txt
- $ sum: 200
- $ ./my_program
- $ 300
Let's use unbuffered I/O:
Buffered I/O. What does it mean? code
Author: Zhuoqun (Tom) Cheng.