◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ──────────────────────────────────────────────────────────────────────────── The fclose function closes the given <stream>. The fcloseall function closes all open streams except stdin, stdout, and stderr (and in DOS, stdaux, and stdprn). It also closes and deletes any temporary files created by tmpfile. In both functions, all buffers associated with the stream are flushed prior to closing. System-allocated buffers are released when the stream is closed. Buffers assigned with setbuf and setvbuf are not automatically released. Return Value The fclose function returns 0 if the stream is successfully closed. The fcloseall function returns the total number of streams closed. Both functions return EOF to indicate an error. -♦-