fcloseall

Closes all open stream files except stdin, stdout and stderr

Local Servers:blocking
Remote Servers:blocking
Platform:NLM
Service:Stream I/O

Syntax

  #include <stdio.h> 
    
  int fcloseall  (void);
  

Return Values

The fcloseall function returns the number of files that were closed, if no errors were encountered. When an error occurs, EOF is returned.

Remarks

The fcloseall function closes all open stream files except stdin, stdout, and stderr. Files closed includes files created (and not yet closed) by fdopen, fopen, and freopen.

See Also

fclose, fdopen, fopen, freopen

fcloseall Example

  #include <stdio.h>  
   
  main ()  
  {  
     printf ("The number of files closed is %d\n", fcloseall () );  
  }