ccompiler.inOnline C Compiler & Docs
Language Reference2026-08-142 min read

Master all 32 ANSI C reserved keywords plus modern C99, C11, and C23 keywords with clear syntactical rules, definitions, and tested code.

What are C Reserved Keywords?

In the C programming language, keywords are predefined, reserved words that carry fixed syntactical meanings to the compiler.

Keywords cannot be used as variable names, struct tags, function names, or custom identifiers.


The 32 Core ANSI C89/C90 Keywords

text (ISO Standard)
auto        double      int         struct
break       else        long        switch
case        enum        register    typedef
char        extern      return      union
const       float       short       unsigned
continue    for         signed      void
default     goto        sizeof      volatile
do          if          static      while

1. Categorized Keyword Reference

Data Types & Definitions

  • char, int, float, double, short, long, signed, unsigned, void: Primitive type specifiers.
  • struct: User-defined composite structure data type.
  • union: Memory-sharing composite data structure.
  • enum: Enumerated user-defined constant list.
  • typedef: Creates a user-defined type alias name.

Control Flow & Branching

  • if, else: Conditional branching statements.
  • switch, case, default: Multi-way integer condition branch.
  • for, while, do: Loop iteration constructs.
  • break: Terminate innermost loop or switch block.
  • continue: Skip remaining statements in current loop iteration.
  • goto: Unconditional jump to a labeled statement.
  • return: Return from function with optional value.

Storage Classes & Qualifiers

  • const: Read-only variable modifier.
  • volatile: Tells compiler variable may change asynchronously.
  • static: Persistent storage across calls or internal file linkage.
  • extern: Global symbol declared in another translation unit.
  • register: Request CPU register storage optimization.
  • auto: Default local automatic storage duration.
  • sizeof: Compile-time operator returning byte size.
c (ISO Standard)
#include <stdio.h>

void trackInvocations() {
    static int callCount = 0; /* static keyword preserves value */
    callCount++;
    printf("Function call count: %d\n", callCount);
}

int main() {
    trackInvocations();
    trackInvocations();
    trackInvocations();
    return 0;
}

2. Keywords Added in Modern ISO C Standards

  • C99: inline, restrict, _Bool, _Complex, _Imaginary
  • C11: _Alignas, _Alignof, _Atomic, _Generic, _Noreturn, _Static_assert, _Thread_local
  • C23: bool, true, false, nullptr, typeof, typeof_unqual, alignas, alignof, static_assert, thread_local

Related Reference Guides & Tutorials