Files
hustoj/web/cppreference-zh/chmhelp/c-keyword.html
2025-08-01 12:57:54 +08:00

309 lines
12 KiB
HTML

<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
<head><meta http-equiv="x-ua-compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>C &#20851;&#38190;&#35789;</title>
<link rel="stylesheet" href="ext.css" />
<link rel="stylesheet" href="site_modules.css" />
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-c_keyword skin-cppreference2 action-view cpp-navbar">
<div id="cpp-content-base">
<div id="content"><a id="top"></a>
<h1 id="firstHeading" class="firstHeading">C &#20851;&#38190;&#35789;</h1>
<div id="bodyContent">
<div id="contentSub"><span class="subpages">&lt; <a href="c.html">c</a></span></div>
<div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr" xml:lang="zh">
<p>&#36825;&#26159; C &#20013;&#20445;&#30041;&#30340;&#20851;&#38190;&#35789;&#21015;&#34920;&#12290;&#22240;&#20026;&#35821;&#35328;&#20351;&#29992;&#36825;&#20123;&#20851;&#38190;&#35789;&#65292;&#25925;&#19981;&#21487;&#37325;&#23450;&#20041;&#23427;&#20204;&#12290;</p>
<table class="wikitable">
<tr>
<td>
<p><a href="c-keyword-auto.html"><code>auto</code></a><br />
<a href="c-keyword-break.html"><code>break</code></a><br />
<a href="c-keyword-case.html"><code>case</code></a><br />
<a href="c-keyword-char.html"><code>char</code></a><br />
<a href="c-keyword-const.html"><code>const</code></a><br />
<a href="c-keyword-continue.html"><code>continue</code></a><br />
<a href="c-keyword-default.html"><code>default</code></a><br />
<a href="c-keyword-do.html"><code>do</code></a><br />
<a href="c-keyword-double.html"><code>double</code></a><br />
<a href="c-keyword-else.html"><code>else</code></a><br />
<a href="c-keyword-enum.html"><code>enum</code></a><br />
<a href="c-keyword-extern.html"><code>extern</code></a></p>
</td>
<td>
<p><a href="c-keyword-float.html"><code>float</code></a><br />
<a href="c-keyword-for.html"><code>for</code></a><br />
<a href="c-keyword-goto.html"><code>goto</code></a><br />
<a href="c-keyword-if.html"><code>if</code></a><br />
<a href="c-keyword-inline.html"><code>inline</code></a> <span class="t-mark-rev t-since-c99">(C99 &#36215;)</span><br />
<a href="c-keyword-int.html"><code>int</code></a><br />
<a href="c-keyword-long.html"><code>long</code></a><br />
<a href="c-keyword-register.html"><code>register</code></a><br />
<a href="c-keyword-restrict.html"><code>restrict</code></a> <span class="t-mark-rev t-since-c99">(C99 &#36215;)</span><br />
<a href="c-keyword-return.html"><code>return</code></a><br />
<a href="c-keyword-short.html"><code>short</code></a></p>
</td>
<td>
<p><a href="c-keyword-signed.html"><code>signed</code></a><br />
<a href="c-keyword-sizeof.html"><code>sizeof</code></a><br />
<a href="c-keyword-static.html"><code>static</code></a><br />
<a href="c-keyword-struct.html"><code>struct</code></a><br />
<a href="c-keyword-switch.html"><code>switch</code></a><br />
<a href="c-keyword-typedef.html"><code>typedef</code></a><br />
<a href="c-keyword-union.html"><code>union</code></a><br />
<a href="c-keyword-unsigned.html"><code>unsigned</code></a><br />
<a href="c-keyword-void.html"><code>void</code></a><br />
<a href="c-keyword-volatile.html"><code>volatile</code></a><br />
<a href="c-keyword-while.html"><code>while</code></a></p>
</td>
<td>
<p><a href="c-keyword-_Alignas.html"><code>_Alignas</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span><br />
<a href="c-keyword-_Alignof.html"><code>_Alignof</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span><br />
<a href="c-keyword-_Atomic.html"><code>_Atomic</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span><br />
<a href="c-keyword-_Bool.html"><code>_Bool</code></a> <span class="t-mark-rev t-since-c99">(C99 &#36215;)</span><br />
<a href="c-keyword-_Complex.html"><code>_Complex</code></a> <span class="t-mark-rev t-since-c99">(C99 &#36215;)</span><br />
<a href="c-keyword-_Decimal128.html"><code>_Decimal128</code></a> <span class="t-mark-rev t-since-c23">(C23 &#36215;)</span><br />
<a href="c-keyword-_Decimal32.html"><code>_Decimal32</code></a> <span class="t-mark-rev t-since-c23">(C23 &#36215;)</span><br />
<a href="c-keyword-_Decimal64.html"><code>_Decimal64</code></a> <span class="t-mark-rev t-since-c23">(C23 &#36215;)</span><br />
<a href="c-keyword-_Generic.html"><code>_Generic</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span><br />
<a href="c-keyword-_Imaginary.html"><code>_Imaginary</code></a> <span class="t-mark-rev t-since-c99">(C99 &#36215;)</span><br />
<a href="c-keyword-_Noreturn.html"><code>_Noreturn</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span><br />
<a href="c-keyword-_Static_assert.html"><code>_Static_assert</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span><br />
<a href="c-keyword-_Thread_local.html"><code>_Thread_local</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span></p>
</td>
</tr>
</table>
<p>&#26368;&#24120;&#35265;&#30340;&#20197;&#19979;&#21010;&#32447;&#24320;&#22836;&#30340;&#20851;&#38190;&#35789;&#36890;&#24120;&#36890;&#36807;&#20854;&#20415;&#21033;&#23439;&#26469;&#20351;&#29992;&#65306;</p>
<table class="wikitable">
<tr>
<td>&#20851;&#38190;&#35789;</td>
<td>&#29992;&#20316;</td>
<td>&#23450;&#20041;&#20110;</td>
</tr>
<tr>
<td><a href="c-keyword-_Alignas.html"><code>_Alignas</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span></td>
<td><a href="c-types.html"><tt>alignas</tt></a></td>
<td><code>stdalign.h</code></td>
</tr>
<tr>
<td><a href="c-keyword-_Alignof.html"><code>_Alignof</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span></td>
<td><a href="c-types.html"><tt>alignof</tt></a></td>
<td><code>stdalign.h</code></td>
</tr>
<tr>
<td><a href="c-keyword-_Atomic.html"><code>_Atomic</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span></td>
<td><a href="c-atomic.html"><tt>atomic_bool. atomic_int, ...</tt></a></td>
<td><code>stdatomic.h</code></td>
</tr>
<tr>
<td><a href="c-keyword-_Bool.html"><code>_Bool</code></a> <span class="t-mark-rev t-since-c99">(C99 &#36215;)</span></td>
<td><a href="c-types.html"><tt>bool</tt></a></td>
<td><code>stdbool.h</code></td>
</tr>
<tr>
<td><a href="c-keyword-_Complex.html"><code>_Complex</code></a> <span class="t-mark-rev t-since-c99">(C99 &#36215;)</span></td>
<td><a href="c-numeric-complex-complex.html"><tt>complex</tt></a></td>
<td><code>complex.h</code></td>
</tr>
<tr>
<td><a href="c-keyword-_Decimal128.html"><code>_Decimal128</code></a> <span class="t-mark-rev t-since-c23">(C23 &#36215;)</span></td>
<td>&#65288;&#26080;&#23439;&#65289;</td>
<td></td>
</tr>
<tr>
<td><a href="c-keyword-_Decimal32.html"><code>_Decimal32</code></a> <span class="t-mark-rev t-since-c23">(C23 &#36215;)</span></td>
<td>&#65288;&#26080;&#23439;&#65289;</td>
<td></td>
</tr>
<tr>
<td><a href="c-keyword-_Decimal64.html"><code>_Decimal64</code></a> <span class="t-mark-rev t-since-c23">(C23 &#36215;)</span></td>
<td>&#65288;&#26080;&#23439;&#65289;</td>
<td></td>
</tr>
<tr>
<td><a href="c-keyword-_Generic.html"><code>_Generic</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span></td>
<td>&#65288;&#26080;&#23439;&#65289;</td>
<td></td>
</tr>
<tr>
<td><a href="c-keyword-_Imaginary.html"><code>_Imaginary</code></a> <span class="t-mark-rev t-since-c99">(C99 &#36215;)</span></td>
<td><a href="c-numeric-complex-imaginary.html"><tt>imaginary</tt></a></td>
<td><code>complex.h</code></td>
</tr>
<tr>
<td><a href="c-keyword-_Noreturn.html"><code>_Noreturn</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span></td>
<td><a href="c-types.html"><tt>noreturn</tt></a></td>
<td><code>stdnoreturn.h</code></td>
</tr>
<tr>
<td><a href="c-keyword-_Static_assert.html"><code>_Static_assert</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span></td>
<td><a href="c-error-static_assert.html"><tt>static_assert</tt></a></td>
<td><code>assert.h</code></td>
</tr>
<tr>
<td><a href="c-keyword-_Thread_local.html"><code>_Thread_local</code></a> <span class="t-mark-rev t-since-c11">(C11 &#36215;)</span></td>
<td><a href="c-thread-thread_local.html"><tt>thread_local</tt></a></td>
<td><code>threads.h</code></td>
</tr>
</table>
<p>&#32780;&#19988;&#65292;&#27599;&#20010;&#20197;&#21452;&#19979;&#21010;&#32447; __ &#25110;&#21333;&#19979;&#21010;&#32447;&#21518;&#38543;&#22823;&#20889;&#23383;&#27597;&#20026;&#39318;&#30340;&#21517;&#31216;&#26159;&#21463;&#20445;&#30041;&#30340;&#65306;&#32454;&#33410;&#21442;&#38405;<a href="c-language-identifier.html#.E4.BF.9D.E7.95.99.E6.A0.87.E8.AF.86.E7.AC.A6">&#26631;&#35782;&#31526;</a>&#12290;</p>
<p>&#27880;&#24847;&#21512;&#23383;&#31526; <code>&lt;%</code> &#12289; <code>%&gt;</code> &#12289; <code>&lt;:</code> &#12289; <code>:&gt;</code> &#12289; <code>%:</code> &#20197;&#21450; <code>%:%:</code> &#25552;&#20379;<a href="c-language-operator_alternative.html">&#34920;&#31034;&#26631;&#20934;&#35760;&#21495;&#30340;&#26367;&#29992;&#26041;&#24335;</a>&#12290;</p>
<p>&#19979;&#21015;&#35760;&#21495;&#22312;&#29992;&#20110;<a href="c-preprocessor.html">&#39044;&#22788;&#29702;&#22120;</a>&#25351;&#20196;&#35821;&#22659;<i>&#20043;&#20869;</i>&#26102;&#65292;&#20026;&#39044;&#22788;&#29702;&#22120;&#25152;&#35782;&#21035;&#65306;</p>
<table class="wikitable">
<tr>
<td>
<p><a href="c-preprocessor-conditional.html"><tt>if</tt></a><br />
<a href="c-preprocessor-conditional.html"><tt>elif</tt></a><br />
<a href="c-preprocessor-conditional.html"><tt>else</tt></a><br />
<a href="c-preprocessor-conditional.html"><tt>endif</tt></a><br /></p>
</td>
<td>
<p><a href="c-preprocessor-conditional.html"><tt>ifdef</tt></a><br />
<a href="c-preprocessor-conditional.html"><tt>ifndef</tt></a><br />
<a href="c-preprocessor-replace.html"><tt>define</tt></a><br />
<a href="c-preprocessor-replace.html"><tt>undef</tt></a><br /></p>
</td>
<td>
<p><a href="c-preprocessor-include.html"><tt>include</tt></a><br />
<a href="c-preprocessor-line.html"><tt>line</tt></a><br />
<a href="c-preprocessor-error.html"><tt>error</tt></a><br />
<a href="c-preprocessor-impl.html"><tt>pragma</tt></a><br /></p>
</td>
<td>
<p><a href="c-preprocessor-conditional.html"><tt>defined</tt></a><br />
<a href="c-language-attributes.html"><tt>__has_c_attribute</tt></a><span class="t-mark-rev t-since-c23">(C23 &#36215;)</span></p>
</td>
</tr>
</table>
<p>&#19979;&#21015;&#35760;&#21495;&#29992;&#20110;&#39044;&#22788;&#29702;&#22120;&#25351;&#20196;&#30340;&#35821;&#22659;<i>&#20043;&#22806;</i>&#26102;&#65292;&#20026;&#39044;&#22788;&#29702;&#22120;&#25152;&#35782;&#21035;&#65306;</p>
<table class="wikitable">
<tr>
<td>
<p><a href="c-preprocessor-impl.html"><tt>_Pragma</tt></a><span class="t-mark-rev t-since-c99">(C99 &#36215;)</span></p>
</td>
</tr>
</table>
<p>&#19979;&#21015;&#30340;&#39069;&#22806;&#20851;&#38190;&#35789;&#34987;&#20998;&#31867;&#20026;&#25193;&#23637;&#65292;&#32780;&#19988;&#20026;&#26465;&#20214;&#24615;&#25903;&#25345;&#65306;</p>
<table class="wikitable">
<tr>
<td>
<p><a href="c-language-asm.html"><tt>asm</tt></a><br />
<a href="c-keyword-fortran.html"><code>fortran</code></a></p>
</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E5.BC.95.E7.94.A8">&#24341;&#29992;</span></h3>
<div class="t-ref-std-17">
<ul>
<li>C17 &#26631;&#20934;&#65288;ISO/IEC 9899:2018&#65289;&#65306;</li>
</ul>
<dl>
<dd>
<ul>
<li>6.4.1 Keywords (p: 42-43)</li>
</ul>
</dd>
</dl>
<dl>
<dd>
<ul>
<li>J.5.9 The fortran keyword (p: 422)</li>
</ul>
</dd>
</dl>
<dl>
<dd>
<ul>
<li>J.5.10 The asm keyword (p: 422)</li>
</ul>
</dd>
</dl>
</div>
<div class="t-ref-std-11">
<ul>
<li>C11 &#26631;&#20934;&#65288;ISO/IEC 9899:2011&#65289;&#65306;</li>
</ul>
<dl>
<dd>
<ul>
<li>6.4.1 Keywords (p: 58-59)</li>
</ul>
</dd>
</dl>
<dl>
<dd>
<ul>
<li>J.5.9 The fortran keyword (p: 580)</li>
</ul>
</dd>
</dl>
<dl>
<dd>
<ul>
<li>J.5.10 The asm keyword (p: 580)</li>
</ul>
</dd>
</dl>
</div>
<div class="t-ref-std-c99">
<ul>
<li>C99 &#26631;&#20934;&#65288;ISO/IEC 9899:1999&#65289;&#65306;</li>
</ul>
<dl>
<dd>
<ul>
<li>6.4.1 Keywords (p: 50)</li>
</ul>
</dd>
</dl>
<dl>
<dd>
<ul>
<li>J.5.9 The fortran keyword (p: 514)</li>
</ul>
</dd>
</dl>
<dl>
<dd>
<ul>
<li>J.5.10 The asm keyword (p: 514)</li>
</ul>
</dd>
</dl>
</div>
<div class="t-ref-std-c89">
<ul>
<li>C89/C90 &#26631;&#20934;&#65288;ISO/IEC 9899:1990&#65289;&#65306;</li>
</ul>
<dl>
<dd>
<ul>
<li>3.1.1 Keywords</li>
</ul>
</dd>
</dl>
<dl>
<dd>
<ul>
<li>G.5.9 The fortran keyword</li>
</ul>
</dd>
</dl>
<dl>
<dd>
<ul>
<li>G.5.10 The asm keyword</li>
</ul>
</dd>
</dl>
</div>
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">&#21442;&#38405;</span></h3>
<table class="t-dsc-begin"></table>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>