File I/O
Opening and closing FILE * streams:
FILE *fopen(char *path, char *mode)
- Open the file called
path in the appropriate mode
- Possible modes include
"r" (read), "w" (write), "a" (append)
- Returns a new
FILE * if open ok, or NULL if failed
int fclose(FILE *f)
- Close the stream
f; return 0 if closed ok and EOF otherwise
Index