<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>fclose</title>
	<atom:link href="https://www.aitaocui.cn/tag/230252/feed" rel="self" type="application/rss+xml" />
	<link>https://www.aitaocui.cn</link>
	<description>翡翠玉石爱好者聚集地</description>
	<lastBuildDate>Sat, 26 Nov 2022 22:42:32 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>

<image>
	<url>https://www.aitaocui.cn/wp-content/uploads/2022/11/taocui.png</url>
	<title>fclose</title>
	<link>https://www.aitaocui.cn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>fclose(函数名)</title>
		<link>https://www.aitaocui.cn/article/342016.html</link>
					<comments>https://www.aitaocui.cn/article/342016.html#respond</comments>
		
		<dc:creator><![CDATA[巴甫洛夫大楼]]></dc:creator>
		<pubDate>Sat, 26 Nov 2022 22:42:32 +0000</pubDate>
				<category><![CDATA[知识]]></category>
		<category><![CDATA[fclose]]></category>
		<guid isPermaLink="false">https://www.aitaocui.cn/?p=342016</guid>

					<description><![CDATA[fclose是一个函数名，功能是关闭一个流。注意：使用fclose()函数就可以把缓冲区内最后剩余的数据输出到内核缓冲区，并释放文件指针和有关的缓冲区。函数原型：int fclos...]]></description>
										<content:encoded><![CDATA[</p>
<article>
<p>fclose是一个函数名，功能是关闭一个流。注意：使用fclose()函数就可以把缓冲区内最后剩余的数据输出到内核缓冲区，并释放文件指针和有关的缓冲区。函数原型：int fclose( FILE *fp );返回值：如果流成功关闭，fclose 返回 0，否则返回EOF（-1）。（如果流为NULL，而且程序可以继续执行，fclose设定error number给EINVAL，并返回EOF。）</p>
</article>
<article>
<h1>定义和用法</h1>
<p>fclose() 函数关闭一个打开文件。</p>
<h1>语法</h1>
<p>fclose(file)/n</p>
<h1>参数/t描述</h1>
<p>file必需。规定要关闭的文件。/n</p>
<h1>说明</h1>
<p>file 参数是一个文件指针。fclose() 函数关闭该指针指向的文件。</p>
<p>如果成功则返回 true，否则返回 false。</p>
<p>文件指针必须有效，并且是通过 fopen() 或 fsockopen() 成功打开的。</p>
<h1>程序例子</h1>
<p>#include </p>
<p>#include </p>
<p>int main(void)</p>
<p>{</p>
<p>FILE *fp;</p>
<p>char buf = &quot;0123456789&quot;;</p>
<p>/* create a file containing 10 bytes */</p>
<p>fp = fopen(&quot;DUMMY.FIL&quot;, &quot;w&quot;);</p>
<p>fwrite(&amp;buf, strlen(buf), 1, fp);</p>
<p>/* close the file */</p>
<p>fclose(fp);</p>
<p>return 0;</p>
<p>}</p>
<p>如果流成功关闭，fclose 返回 0，否则返回EOF（-1）。</p>
<p>如果流为NULL，而且程序可以继续执行，fclose设定error number给EINVAL，并返回EOF。</p>
</article>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aitaocui.cn/article/342016.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
