Standard C++ Library Reference ISO/IEC (VERSION3)
fputc
int fputc(int c, FILE *stream);
The function writes the character (unsigned char)c to the output stream stream,
advances the file-position indicator (if defined), and returns (int)(unsigned char)c. If
the function sets the error indicator for the stream, it returns EOF.
fputs
int fputs(const char *s, FILE *stream);
The function accesses characters from the C string s and writes them to the output stream
stream. The function does not write the terminating null character. It returns a nonnegative
value if it has not set the error indicator; otherwise, it returns EOF.
fread
size_t fread(void *ptr,
size_t size, size_t nelem, FILE *stream);
The function reads characters from the input stream stream and stores them in successive
elements of the array whose first element has the address (char *)ptr until the function
stores size*nelem characters or sets the end-of-file or error indicator. It returns n/size,
where n is the number of characters it read. If n is not a multiple of size, the value stored in
the last element is indeterminate. If the function sets the error indicator, the file-position
indicator is indeterminate.
freopen
FILE *freopen(const char *filename, const char *mode,
FILE *stream);
The function closes the file associated with the stream stream (as if by calling fclose); then
it opens the file with the filename filename and associates the file with the stream stream
(as if by calling fopen(filename, mode)). It returns stream if the open is successful;
otherwise, it returns a null pointer.
fscanf
int fscanf(FILE *stream, const char *format, ...);
The function scans formatted text, under the control of the format format and any additional