Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
C (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Reserved words === The following reserved words are [[case sensitive]]. C89 has 32 reserved words, also known as 'keywords', which cannot be used for any purposes other than those for which they are predefined: {{div col|colwidth=13em}} * <code>auto</code> * <code>[[Break statement|break]]</code> * <code>case</code> * <code>char</code> * <code>[[const]]</code> * <code>[[Continue (keyword)|continue]]</code> * <code>default</code> * <code>do</code> * <code>[[Double-precision floating-point format|double]]</code> * <code>[[Conditional (computer programming)|else]]</code> * <code>[[Enumerated type|enum]]</code> * <code>[[extern]]</code> * <code>[[Floating-point arithmetic|float]]</code> * <code>[[For loop|for]]</code> * <code>[[goto]]</code> * <code>[[Conditional (computer programming)|if]]</code> * <code>[[Integer (computer science)|int]]</code> * <code>[[Long integer|long]]</code> * <code>[[Register (keyword)|register]]</code> * <code>[[Return statement|return]]</code> * <code>[[Short integer|short]]</code> * <code>[[Signed number representations|signed]]</code> * <code>[[sizeof]]</code> * <code>[[Static (keyword)|static]]</code> * <code>[[Struct (C programming language)|struct]]</code> * <code>[[Switch statement|switch]]</code> * <code>[[typedef]]</code> * <code>[[Union type|union]]</code> * <code>[[Signed number representations|unsigned]]</code> * <code>[[Void type|void]]</code> * <code>[[Volatile variable|volatile]]</code> * <code>[[While loop|while]]</code> {{div col end}} C99 added five more reserved words: (β‘ indicates an alternative spelling alias for a C23 keyword) {{div col|colwidth=13em}} * <code>[[Inline function|inline]]</code> * <code>[[restrict]]</code> * <code>_Bool</code> β‘ * <code>[[Complex data type|_Complex]]</code> * <code>[[Complex data type|_Imaginary]]</code> {{div col end}} C11 added seven more reserved words:<ref name="ISOIEC 9899">{{Cite web|url=http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf|title=ISO/IEC 9899:201x (ISO C11) Committee Draft|website=open-std.org|date=December 2, 2010|access-date=September 16, 2011|archive-date=December 22, 2017|archive-url=https://web.archive.org/web/20171222215122/http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf|url-status=live}}</ref> (β‘ indicates an alternative spelling alias for a C23 keyword) {{div col|colwidth=13em}} * <code>_Alignas</code> β‘ * <code>_Alignof</code> β‘ * <code>_Atomic</code> * <code>_Generic</code> * <code>_Noreturn</code> * <code>_Static_assert</code> β‘ * <code>_Thread_local</code> β‘ {{div col end}} C23 reserved fifteen more words: {{div col|colwidth=13em}} * <code>alignas</code> * <code>alignof</code> * <code>bool</code> * <code>constexpr</code> * <code>false</code> * <code>nullptr</code> * <code>static_assert</code> * <code>thread_local</code> * <code>true</code> * <code>typeof</code> * <code>typeof_unqual</code> * <code>_BitInt</code> * <code>_Decimal32</code> * <code>_Decimal64</code> * <code>_Decimal128</code> {{div col end}} Most of the recently reserved words begin with an underscore followed by a capital letter, because identifiers of that form were previously reserved by the C standard for use only by implementations. Since existing program source code should not have been using these identifiers, it would not be affected when C implementations started supporting these extensions to the programming language. Some standard headers do define more convenient synonyms for underscored identifiers. Some of those words were added as keywords with their conventional spelling in C23 and the corresponding macros were removed. Prior to C89, <code>entry</code> was reserved as a keyword. In the second edition of their book ''[[The C Programming Language]]'', which describes what became known as C89, Kernighan and Ritchie wrote, "The ... [keyword] <code>entry</code>, formerly reserved but never used, is no longer reserved." and "The stillborn <code>entry</code> keyword is withdrawn."{{sfnp|Kernighan|Ritchie|1988|pp=192, 259}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)