October 2006
Beginner
637 pages
19h 6m
English
This appendix summarizes all the format specifications you have available for stream input and output. You use these with the standard streams stdin, stdout, and stderr, as well as text file streams.
There are three standard library functions for formatted output: the printf() that writes to the standard output stream stdout (which by default is the command line), the sprintf() function that writes to a string, and the fprintf() function that writes to a file. These functions have the following form:
int printf(const char* format_string, . . .);
int sprintf(char* source_string, const char* format_string, . . .); int fprintf(FILE* file_stream, const char* format_string, ...Read now
Unlock full access