System-Level I/O

QuoteI think the major good idea in Unix was its clean and simple interface: open, close, read, and write.

by Ken Thompson

10.1 - 10.5 visit book

10.6 - 10.10 visit here

test

code directory: ./code

test way:

  • assert means assert function from <assert.h>
  • output means to watch code output to judge if it works right
solution code file test way
10.6 10.6.c output
10.7 10.7.c output
10.8 10.8.c output
10.9 —— ——
10.10 10.10.c output