2.1.9 File IO


Name Brief Example
fclose The fclose function closes stream. Examples
feof The feof routine determines whether the end of stream has been reached. When end of file is reached, read operations return an end-of-file indicator until the stream is closed. Examples
ferror The ferror routine tests for a reading or writing error on the file associated with stream. If an error has occurred, the error indicator for the stream remains set until the stream is closed or rewound, or until clearerr is called against it. Examples
fflush The fflush function flushes a stream. Examples
fgetc Reads a single character from the current position of a file associated with stream. Examples
fgets Reads a string from the input stream argument and stores it in string. Examples
fopen Opens the file specified by filename. Examples
fprintf Formats and prints a series of characters and values to the output stream. Examples
fputc Each of these functions writes the single character c to a file. Examples
fputs This function copies string to the output stream at the current position. Examples
fread Reads up to count items of size bytes from the input stream and stores them in buffer. Examples
fscanf Reads data from the current position of stream into the locations given by argument Examples
fseek Moves the file pointer (if any) associated with stream to a new location that is offset bytes from origin. Examples
ftell Gets the current position of the file pointer (if any) associated with stream. Examples
fwrite Writes up to count items, of size length each, from buffer to the output stream. Examples