Files I/O
standard input file stdin, and standard output file stdout (terminal I/O): scanf() and printf()
sscanf() and sprintf() are string versions of scanf and printf.
similarly fscanf() and fprintf() are the file versions
thus fprintf(stdout,...) ? printf(...)
fscanf(stdin,...) ? scanf(...)
extend terminal I/O to work on files
- Prototype for fscanf() and fprintf()
- int fprint(FILE *ofp, const char *format,...)
- int fscanf(FILE *ofp, const char *format,...)
- where FILE is structure data type; stdin, stdout are standard file pointer provided in <stdio.h>