fcloseall 百科内容来自于: 百度百科

函数名: fcloseall
功 能: 关闭除标准流(stdin、stdout、stderr、stdprn、stdaux)之外的所有打开的流,刷新所有的流缓冲区,并返回关闭的流数。
函数原型: int fcloseall(void);
返回值:如果流成功关闭,返回 关闭的流文件数目,否则返回EOF。
程序例:
#include<stdio.h>
intmain(void)
{
intstreams_closed;
/*opentwostreams*/
fopen("DUMMY.ONE","w");
fopen("DUMMY.TWO","w");
/*closetheopenstreams*/
streams_closed=fcloseall();
if(streams_closed==EOF)
/*issueanerrormessage*/
perror("Error");
else
/*printresultoffcloseall()function*/
printf("%dstreamswereclosed.\n",streams_closed);
return0;
}
$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定