YOUR C LEARNING COMPANION

Find your next idea.

Learning path
Language detailsChapter 20 of 73

C keyword index: C17 and C23

Browse every standard keyword spelling by edition, role, and a link to its deeper explanation.

7 min readFoundationsC17 + C23 notes
Offline reading
In this chapter10 sections

Use this chapter as a lookup page. Find a keyword, check which C edition introduced its spelling, and follow its concept link for the explanation. You do not need to memorise the whole list before writing or understanding C.

1. Find a spelling, then check the selected standard

C89/C90 introduced 32 keywords; C99 brought the total to 37; C11/C17 has 44. C23 has 54 primary keyword spellings plus five older alternative spellings, for 59 recognized spellings in this index. The alternatives are _Alignas, _Alignof, _Bool, _Static_assert, and _Thread_local; they are obsolescent in C23, rather than simply removed.

The “introduced” groups below are historical. C23 changes some older keywords' roles, including auto inference. It also prefers alignas, alignof, bool, static_assert, thread_local over their underscored alternatives. Feature reservation and feature availability are separate: atomic, complex/imaginary, and decimal facilities have applicable optional-support rules.

Jump to C89/C90, C99, C11/C17, or C23 additions. Your browser's Find command can locate an exact spelling.

2. C89/C90: the original 32

KeywordRole / version noteExplore
autoAutomatic storage; C23 also permits type inference in supported declaration formsTheory
breakExit the nearest loop or switchTheory
caseA labeled branch within switchTheory
charCharacter/small-integer type; sizeof(char) is 1Theory
constRead-only access through this qualified type; not a general compile-time-constant guaranteeTheory
continueContinue the nearest loop (the for update still runs)Theory
defaultThe default labeled branch of switchTheory
doA loop whose body runs before its condition is testedTheory
doubleFloating-point type; long double is another floating typeTheory
elseAlternative branch of ifTheory
enumAn enumerated type and its enumeration constantsTheory
externDeclare an object/function with linkage; an initialized object declaration can also be a definitionTheory
floatFloating-point typeTheory
forIteration with initialization, condition, and update clausesTheory
gotoJump to a label within the same functionTheory
ifConditional execution based on a scalar expressionTheory
intInteger type with implementation-dependent range above a required minimumTheory
longType specifier used in long int, long long int, and long doubleTheory
registerAutomatic storage with an optimization suggestion; no direct unary & address-takingTheory
returnReturn from a function, optionally with a valueTheory
shortType specifier for short integer typesTheory
signedType specifier for signed integer typesTheory
sizeofSize of a type or expression in C bytes; result type size_tTheory
staticStatic storage duration for objects, or internal linkage at file scope; also has an array-parameter useTheory
structA structure type with ordered membersTheory
switchSelection using an integer controlling expressionTheory
typedefAn alias for a type; not a new distinct typeTheory
unionA type whose members share storageTheory
unsignedType specifier for unsigned integer typesTheory
voidNo value; void * is a generic object-pointer typeTheory
volatileAccesses have special observable semantics; not thread synchronizationTheory
whileLoop with its condition tested before each iterationTheory

3. C99: five additional spellings

KeywordRole / version noteExplore
inlineFunction specifier with special definition/linkage rules; no guarantee of call expansionTheory
restrictPointer-access/aliasing contract for optimizationTheory
_BoolBoolean type; older alternative spelling of bool in C23Theory
_ComplexComplex floating types; support is conditional in later standardsTheory
_ImaginaryReserved keyword for optional imaginary types; support is not guaranteedTheory

4. C11/C17: seven additional spellings

C17 retains these C11 spellings while incorporating corrections. _Noreturn remains recognized but is deprecated in C23 in favor of [[noreturn]].

KeywordRole / version noteExplore
_AlignasAlignment specifier for an object; older spelling of alignasTheory
_AlignofQuery a type’s alignment; older spelling of alignofTheory
_AtomicAtomic type specifier/qualifier; not every algorithm becomes atomic automaticallyTheory
_GenericSelect an expression by type at translation timeTheory
_NoreturnA function does not return to its caller; deprecated in C23 in favor of [[noreturn]]Theory
_Static_assertCompile-time assertion; older spelling of static_assertTheory
_Thread_localThread storage duration; older spelling of thread_localTheory

5. C23: fifteen additional spellings

These are C23 language spellings. In older standards some names came from standard-header macros; typeof was also available as a compiler extension. Those histories do not erase the version distinction.

KeywordRole / version noteExplore
alignasAlignment specifier, now a keyword without a header macroTheory
alignofAlignment-query operator, now a keywordTheory
boolBoolean type, now a keywordTheory
constexprNamed constant object with constrained initialization; implies const, not a C++ constexpr functionTheory
falseBoolean false predefined constantTheory
nullptrNull-pointer predefined constant; its type is named nullptr_t by <stddef.h>Theory
static_assertCompile-time assertion, now a keywordTheory
thread_localThread storage duration, now a keywordTheory
trueBoolean true predefined constantTheory
typeofDerive a type from a type name or expression; variably modified types need extra evaluation careTheory
typeof_unqualLike typeof, removing top-level and atomic qualification; pointed-to const remainsTheory
_BitIntBit-precise integer type specifier, used as _BitInt(N)Theory
_Decimal32Decimal floating type, only on implementations supporting decimal floating pointTheory
_Decimal64Decimal floating type, only on implementations supporting decimal floating pointTheory
_Decimal128Decimal floating type, only on implementations supporting decimal floating pointTheory

6. A familiar library name is not automatically a keyword

printf is a library function name. size_t and C23 nullptr_t are type names supplied by library headers. NULL is a macro, and noreturn in [[noreturn]] is an attribute name. Preprocessing directive names such as include and define are not extra ordinary C keywords. Other reservation rules still apply to library and implementation names.

In C17, bool/true/false come from <stdbool.h>, alignas/alignof from <stdalign.h>, static_assert from <assert.h>, and thread_local from <threads.h> when that facility is supported. The next complete C17 example demonstrates three header routes without claiming that the spellings are already C17 language keywords.

Complete C17 program
#include <assert.h>
#include <stdbool.h>
#include <stdalign.h>

static_assert(sizeof(char) == 1, "one C byte");

int main(void)
{
    alignas(int) int value = 4;
    bool ready = true;
    assert(ready && value == 4);
    return 0;
}

C23 uses the primary spellings as language features without those macro dependencies. This is why a keyword list must state its standard rather than treating every familiar token as timeless syntax.

7. Thought check: does a reserved spelling prove support?

A compiler recognizes _Decimal64 as reserved. Does that prove decimal floating arithmetic is available?

No. The reservation prevents ordinary identifier use; availability follows the implementation's required or optional feature rules and documented support. Select the language mode, check the facility, and compile a relevant capability test before relying on it.

Sources and further reading

Primary references: WG14 N1570 6.4.1, 7.2, 7.15, 7.18, and 7.26; N3096 6.4.1, 6.4.4.5, 6.7.1, 6.7.2.5, and 6.7.9; WG14 N3096 (C23 notes). These are public committee drafts; the examples here use a C17 baseline.

Before you move on

  • This index is a lookup aid linked to the corresponding theory chapters.
  • Keyword status and familiar header macros can differ between C17 and C23.
  • Recognising a spelling is the start of understanding its constraints and useful contexts.
Keep these ideas separate
Keyword / Library name
A reserved language spelling and a name supplied by a header belong to different mechanisms.
Explain it in your own words

How would you check whether a familiar spelling is a keyword or a header macro in the edition you use?

Optional: say it aloud or keep a note. You can continue whenever you are ready.

Check your understanding

Optional. Answers are not saved or sent, and reading stays unrestricted.

Is printf a C language keyword?
Read the explanation for every choice
  1. Yes, every standard library name is a keyword.

    Library identifiers and language keywords are separate categories.

  2. No. It names a standard library function declared through <stdio.h>.

    ✓ Correct reasoning. Including a header supplies declarations; it does not turn the name into a language keyword.

  3. It becomes a keyword only after its first call.

    Calling a function does not change the lexical category of its identifier.

C17

Quick reference from the earlier edition

Retained for existing section links and saved passages. Exact corrections are recorded in the source review.

The set of keywords in C has evolved with each standard. The following table summarizes the keywords in major C standards, including their meanings and roles.

Table 1: C Language Keywords and Their Meanings

Keyword Meaning / Role Standard(s)
autoAutomatic storage; C23 also permits type inference in supported declaration formsC89+; inference C23
breakExit the nearest loop or switchC89+
caseA labeled branch within switchC89+
charCharacter/small-integer type; sizeof(char) is 1C89+
constRead-only access through this qualified type; not a general compile-time-constant guaranteeC89+
continueContinue the nearest loop (the for update still runs)C89+
defaultThe default labeled branch of switchC89+
doA loop whose body runs before its condition is testedC89+
doubleFloating-point type; long double is another floating typeC89+
elseAlternative branch of ifC89+
enumAn enumerated type and its enumeration constantsC89+
externDeclare an object/function with linkage; an initialized object declaration can also be a definitionC89+
floatFloating-point typeC89+
forIteration with initialization, condition, and update clausesC89+
gotoJump to a label within the same functionC89+
ifConditional execution based on a scalar expressionC89+
intInteger type with implementation-dependent range above a required minimumC89+
longType specifier used in long int, long long int, and long doubleC89+; long long C99
registerAutomatic storage with an optimization suggestion the compiler may ignoreC89+
returnReturn from a function, optionally with a valueC89+
shortType specifier for short integer typesC89+
signedType specifier for signed integer typesC89+
sizeofSize of a type or expression in C bytes; result type size_tC89+
staticStatic storage duration for objects, or internal linkage at file scope; also has an array-parameter useC89+; array parameters C99
structA structure type with ordered membersC89+
switchSelection using an integer controlling expressionC89+
typedefAn alias for a type; not a new distinct typeC89+
unionA type whose members share storageC89+
unsignedType specifier for unsigned integer typesC89+
voidNo value; void * is a generic object-pointer typeC89+
volatileAccesses have special observable semantics; not thread synchronizationC89+
whileLoop with its condition tested before each iterationC89+
inlineFunction specifier with special definition/linkage rules; no guarantee of call expansionC99+
restrictPointer-access/aliasing contract for optimizationC99+
_BoolBoolean type; older alternative spelling of bool in C23C99+; alternative in C23
_ComplexComplex floating types; support is conditional in later standardsC99+
_ImaginaryReserved keyword for optional imaginary types; support is not guaranteedC99+
_AlignasAlignment specifier for an object; older spelling of alignasC11+; alternative in C23
_AlignofQuery a type’s alignment; older spelling of alignofC11+; alternative in C23
_AtomicAtomic type specifier/qualifier; not every algorithm becomes atomic automaticallyC11+; conditional support
_GenericSelect an expression by type at translation timeC11+
_NoreturnA function does not return to its caller; deprecated in C23 in favor of [[noreturn]]C11+; deprecated in C23
_Static_assertCompile-time assertion; older spelling of static_assertC11+; alternative in C23
_Thread_localThread storage duration; older spelling of thread_localC11+; alternative in C23
alignasAlignment specifier, now a keyword without a header macroC23+
alignofAlignment-query operator, now a keywordC23+
boolBoolean type, now a keywordC23+
constexprDefine a constant object with constant-expression initializationC23+
falseBoolean false predefined constantC23+
nullptrNull-pointer predefined constant; its type is named nullptr_t by <stddef.h>C23+
static_assertCompile-time assertion, now a keywordC23+
thread_localThread storage duration, now a keywordC23+
trueBoolean true predefined constantC23+
typeofType derived from a type name or expressionC23+
typeof_unqualLike typeof, removing top-level qualifiers and atomic qualificationC23+
_BitIntBit-precise integer type specifier, used as _BitInt(N)C23+
_Decimal32Decimal floating type, only on implementations supporting decimal floating pointC23+; conditional support
_Decimal64Decimal floating type, only on implementations supporting decimal floating pointC23+; conditional support
_Decimal128Decimal floating type, only on implementations supporting decimal floating pointC23+; conditional support

Version counts: C89/C90 has 32 keywords, C99 has 37, and C11/C17 has 44. C23 lists 54 primary keyword spellings plus five older alternative spellings (_Alignas, _Alignof, _Bool, _Static_assert, _Thread_local): 59 recognized spellings in this table. Those five alternatives are obsolescent in C23. A reserved keyword does not guarantee that an optional feature is implemented. Header names, NULL, size_t, nullptr_t, and attribute names are not additional language keywords.

Ready for the next idea?

Mark this chapter as read whenever you feel ready.

CHAPTER 20 / 73

In this chapter

C keyword index: C17 and C23

Search all 73 chapters in both languages.EN + HG

Try “pointer”, “why int”, or “undefined behavior”.

Concepts connect. Follow your curiosity.↑ ↓ to explore · Enter to open
MAKE YOURSELF COMFORTABLE

Your reading space

Appearance

A clear canvas with balanced contrast.

Text size

100%
AA

Reading tools

Your data stays in this browser

Export a backup before changing browsers or replacing an older version of the reader.

YOUR PERSONAL MARGINS

My notebook

Saved on this device
A LITTLE CLARITY

The glossary

A starting meaning, then a chapter to go deeper.

A QUICK DEFINITION

A little clarity

Read the full explanation →

A thought worth keeping