DMP - Chapter 12
File I/O
What is a file?
The text view and the binary view
Standard I/O (stdin,
stdout, stderr)
- fopen(): "r", "w", "a", +, b
- getc() & putc()
- fclose() & flush()
- fprintf() & fscanf()
- fgets() & fputs()
- fseek() & ftell(): SEEK_SET, SEEK_CUR, SEEK_END
- fread() & fwrite()
- feof() & ferror()
Assignment #14: Due Feb. 13
Extend Assignment #13 by allowing file I/O, i.e. use flags to indicate
names of input and output files. This should be optional. For example:
pitch_reader -i input_file -o output_file
OR
pitch_reader -o output_file df3 c4 as2 g5
OR
pitch_reader -i input_file
OR
pitch_reader d3 f4 g5 af5 ef3 c4
Go to Ich's Home Page
Go to the Peabody Home Page
For comments or questions email to:
ich@peabody.jhu.edu