Next: File input Up: Input-Output Previous: Getting access to

File output

Having opened a file, we use

	fprintf(fp, ...);

where fp the file pointer returned by fopen(), and ``...'' is what you have already met for printf i.e. a format conversion string, followed by a list of arguments to be output. In fact there are two output files predefined for you, stdout and stderr. printf(...) is in fact fprintf(stdout,...) and is normally the screen but can be redirected by you using the > operator. stderr is always the screen.



Next: File input Up: Input-Output Previous: Getting access to


maspjw@
Tue Sep 27 15:29:34 BST 1994