文件的打开、关闭、读和写函数(fopen()、fclose()、fgets()、getc()等等)、printf()函数系列和setvbuf()函数都需要它。
来源:互联网摘选它演示了对一些系统调用和C库函数的适当使用,其中包括fopen、fclose、access、setvbuf、perror、strerror和popen。
来源:互联网摘选While the C standard doesn't specify what happens without the fclose(), it's likely to leak memory.
在没有fclose()的情况下,C标准不能指定发生的情况时,很可能是内存泄漏。
来源:互联网摘选当然,除fclose以外,您可能已经对这些函数的返回值都进行了处理。
来源:互联网摘选使用fclose时,即使文件处理未正常关闭,也不会执行什么操作,因此通常不必检查fclose的返回值。
来源:互联网摘选The fgets, fgetss, fread, fscanf, and fclose functions also return False on error.
fscanf和fclose函数在出错时也返回False。
来源:互联网摘选英语网 · 少儿英语故事
英语网 · 双语新闻
英语网 · 双语娱乐资讯

英语网 · 英语词汇
英语网 · 双语娱乐资讯

英语网 · 双语娱乐资讯