C keyword index: C17 and C23
Browse every standard keyword spelling by edition, role, and a link to its deeper explanation.
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
| Keyword | Role / version note | Explore |
|---|---|---|
auto | Automatic storage; C23 also permits type inference in supported declaration forms | Theory |
break | Exit the nearest loop or switch | Theory |
case | A labeled branch within switch | Theory |
char | Character/small-integer type; sizeof(char) is 1 | Theory |
const | Read-only access through this qualified type; not a general compile-time-constant guarantee | Theory |
continue | Continue the nearest loop (the for update still runs) | Theory |
default | The default labeled branch of switch | Theory |
do | A loop whose body runs before its condition is tested | Theory |
double | Floating-point type; long double is another floating type | Theory |
else | Alternative branch of if | Theory |
enum | An enumerated type and its enumeration constants | Theory |
extern | Declare an object/function with linkage; an initialized object declaration can also be a definition | Theory |
float | Floating-point type | Theory |
for | Iteration with initialization, condition, and update clauses | Theory |
goto | Jump to a label within the same function | Theory |
if | Conditional execution based on a scalar expression | Theory |
int | Integer type with implementation-dependent range above a required minimum | Theory |
long | Type specifier used in long int, long long int, and long double | Theory |
register | Automatic storage with an optimization suggestion; no direct unary & address-taking | Theory |
return | Return from a function, optionally with a value | Theory |
short | Type specifier for short integer types | Theory |
signed | Type specifier for signed integer types | Theory |
sizeof | Size of a type or expression in C bytes; result type size_t | Theory |
static | Static storage duration for objects, or internal linkage at file scope; also has an array-parameter use | Theory |
struct | A structure type with ordered members | Theory |
switch | Selection using an integer controlling expression | Theory |
typedef | An alias for a type; not a new distinct type | Theory |
union | A type whose members share storage | Theory |
unsigned | Type specifier for unsigned integer types | Theory |
void | No value; void * is a generic object-pointer type | Theory |
volatile | Accesses have special observable semantics; not thread synchronization | Theory |
while | Loop with its condition tested before each iteration | Theory |
3. C99: five additional spellings
| Keyword | Role / version note | Explore |
|---|---|---|
inline | Function specifier with special definition/linkage rules; no guarantee of call expansion | Theory |
restrict | Pointer-access/aliasing contract for optimization | Theory |
_Bool | Boolean type; older alternative spelling of bool in C23 | Theory |
_Complex | Complex floating types; support is conditional in later standards | Theory |
_Imaginary | Reserved keyword for optional imaginary types; support is not guaranteed | Theory |
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]].
| Keyword | Role / version note | Explore |
|---|---|---|
_Alignas | Alignment specifier for an object; older spelling of alignas | Theory |
_Alignof | Query a type’s alignment; older spelling of alignof | Theory |
_Atomic | Atomic type specifier/qualifier; not every algorithm becomes atomic automatically | Theory |
_Generic | Select an expression by type at translation time | Theory |
_Noreturn | A function does not return to its caller; deprecated in C23 in favor of [[noreturn]] | Theory |
_Static_assert | Compile-time assertion; older spelling of static_assert | Theory |
_Thread_local | Thread storage duration; older spelling of thread_local | Theory |
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.
| Keyword | Role / version note | Explore |
|---|---|---|
alignas | Alignment specifier, now a keyword without a header macro | Theory |
alignof | Alignment-query operator, now a keyword | Theory |
bool | Boolean type, now a keyword | Theory |
constexpr | Named constant object with constrained initialization; implies const, not a C++ constexpr function | Theory |
false | Boolean false predefined constant | Theory |
nullptr | Null-pointer predefined constant; its type is named nullptr_t by <stddef.h> | Theory |
static_assert | Compile-time assertion, now a keyword | Theory |
thread_local | Thread storage duration, now a keyword | Theory |
true | Boolean true predefined constant | Theory |
typeof | Derive a type from a type name or expression; variably modified types need extra evaluation care | Theory |
typeof_unqual | Like typeof, removing top-level and atomic qualification; pointed-to const remains | Theory |
_BitInt | Bit-precise integer type specifier, used as _BitInt(N) | Theory |
_Decimal32 | Decimal floating type, only on implementations supporting decimal floating point | Theory |
_Decimal64 | Decimal floating type, only on implementations supporting decimal floating point | Theory |
_Decimal128 | Decimal floating type, only on implementations supporting decimal floating point | Theory |
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.
#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.
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.
Read the explanation for every choice
- Yes, every standard library name is a keyword.
Library identifiers and language keywords are separate categories.
- 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.
- 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) |
|---|---|---|
auto | Automatic storage; C23 also permits type inference in supported declaration forms | C89+; inference C23 |
break | Exit the nearest loop or switch | C89+ |
case | A labeled branch within switch | C89+ |
char | Character/small-integer type; sizeof(char) is 1 | C89+ |
const | Read-only access through this qualified type; not a general compile-time-constant guarantee | C89+ |
continue | Continue the nearest loop (the for update still runs) | C89+ |
default | The default labeled branch of switch | C89+ |
do | A loop whose body runs before its condition is tested | C89+ |
double | Floating-point type; long double is another floating type | C89+ |
else | Alternative branch of if | C89+ |
enum | An enumerated type and its enumeration constants | C89+ |
extern | Declare an object/function with linkage; an initialized object declaration can also be a definition | C89+ |
float | Floating-point type | C89+ |
for | Iteration with initialization, condition, and update clauses | C89+ |
goto | Jump to a label within the same function | C89+ |
if | Conditional execution based on a scalar expression | C89+ |
int | Integer type with implementation-dependent range above a required minimum | C89+ |
long | Type specifier used in long int, long long int, and long double | C89+; long long C99 |
register | Automatic storage with an optimization suggestion the compiler may ignore | C89+ |
return | Return from a function, optionally with a value | C89+ |
short | Type specifier for short integer types | C89+ |
signed | Type specifier for signed integer types | C89+ |
sizeof | Size of a type or expression in C bytes; result type size_t | C89+ |
static | Static storage duration for objects, or internal linkage at file scope; also has an array-parameter use | C89+; array parameters C99 |
struct | A structure type with ordered members | C89+ |
switch | Selection using an integer controlling expression | C89+ |
typedef | An alias for a type; not a new distinct type | C89+ |
union | A type whose members share storage | C89+ |
unsigned | Type specifier for unsigned integer types | C89+ |
void | No value; void * is a generic object-pointer type | C89+ |
volatile | Accesses have special observable semantics; not thread synchronization | C89+ |
while | Loop with its condition tested before each iteration | C89+ |
inline | Function specifier with special definition/linkage rules; no guarantee of call expansion | C99+ |
restrict | Pointer-access/aliasing contract for optimization | C99+ |
_Bool | Boolean type; older alternative spelling of bool in C23 | C99+; alternative in C23 |
_Complex | Complex floating types; support is conditional in later standards | C99+ |
_Imaginary | Reserved keyword for optional imaginary types; support is not guaranteed | C99+ |
_Alignas | Alignment specifier for an object; older spelling of alignas | C11+; alternative in C23 |
_Alignof | Query a type’s alignment; older spelling of alignof | C11+; alternative in C23 |
_Atomic | Atomic type specifier/qualifier; not every algorithm becomes atomic automatically | C11+; conditional support |
_Generic | Select an expression by type at translation time | C11+ |
_Noreturn | A function does not return to its caller; deprecated in C23 in favor of [[noreturn]] | C11+; deprecated in C23 |
_Static_assert | Compile-time assertion; older spelling of static_assert | C11+; alternative in C23 |
_Thread_local | Thread storage duration; older spelling of thread_local | C11+; alternative in C23 |
alignas | Alignment specifier, now a keyword without a header macro | C23+ |
alignof | Alignment-query operator, now a keyword | C23+ |
bool | Boolean type, now a keyword | C23+ |
constexpr | Define a constant object with constant-expression initialization | C23+ |
false | Boolean false predefined constant | C23+ |
nullptr | Null-pointer predefined constant; its type is named nullptr_t by <stddef.h> | C23+ |
static_assert | Compile-time assertion, now a keyword | C23+ |
thread_local | Thread storage duration, now a keyword | C23+ |
true | Boolean true predefined constant | C23+ |
typeof | Type derived from a type name or expression | C23+ |
typeof_unqual | Like typeof, removing top-level qualifiers and atomic qualification | C23+ |
_BitInt | Bit-precise integer type specifier, used as _BitInt(N) | C23+ |
_Decimal32 | Decimal floating type, only on implementations supporting decimal floating point | C23+; conditional support |
_Decimal64 | Decimal floating type, only on implementations supporting decimal floating point | C23+; conditional support |
_Decimal128 | Decimal floating type, only on implementations supporting decimal floating point | C23+; 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.