Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdio.h>
    int fclose( FILE *fp );

Description:
    The fclose function closes the file fp.  If there was any unwritten
    buffered data for the file, it is written out before the file is closed.
     Any unread buffered data is discarded.  If the associated buffer was
    automatically allocated, it is deallocated.

Returns:
    The fclose function returns zero if the file was successfully closed, or
    non-zero if any errors were detected.  When an error has occurred,
     errno contains a value indicating the type of error that has been
    detected.

See Also:
    fcloseall, fdopen, fopen, freopen, _fsopen

Example:
    #include <stdio.h>

    void main()
      {
        FILE *fp;

        fp = fopen( "stdio.h", "r" );
        if( fp != NULL ) {
            fclose( fp );
        }
      }

Classification:
    ANSI

Systems:
    All

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson