C Language

Curated hub for core C language rules: declarations, expressions, statements, types, initialization, conversions, and object lifetime.

The C language reference covers how declarations introduce names, how expressions are evaluated, how statements control execution, and how objects and functions are typed, initialized, and stored. This hub is the task-first entry point for those core language rules.

Use this page for language semantics, not library APIs. For headers and functions, go back to the C root hub or jump directly to library areas such as I/O, string, or numerics.

# Start Here

Declarations and definitions

Start here when the question is about introducing names, forming declarators, defining functions, or understanding what a declaration means.

Expressions and operators

Use this route for precedence, evaluation, operators, conversions, and value computation rules.

Statements and control flow

Choose this route for `if`, loops, `switch`, `goto`, `return`, and how execution moves through a C program.

Types and objects

Start here when the question is about type categories, object representation, arrays, pointers, structs, unions, or qualifiers.

Initialization and lifetime

Use this route for object creation, initialization forms, compound literals, lifetime rules, and storage duration.

Scope, linkage, and storage duration

Use this route when semantics depend on file scope, block scope, linkage, `_Thread_local`, or the duration of an object.

# Quick Map

If your question is aboutStart withTypical follow-ups
How a name, object, or function is introducedDeclarationsIdentifiers, Function declarations, typedef
What an expression means or how operators groupExpressionsConversions, Operator precedence, Evaluation order
How program flow branches, loops, or exitsStatementsif, while, for, return
Which type rules apply to an object or expressionTypesArithmetic types, Compatible type, const, restrict, volatile
How an object is initialized or when its lifetime beginsInitializationScalar initialization, Struct initialization, Lifetime
Whether a value converts implicitly or explicitlyConversionsCast, Value categories, Boolean conversion
Where a name is visible or how long an object existsStorage durationScope, File scope, Thread storage duration

# Core Language Areas

AreaKey pagesUse it for
Declarations and program structureDeclarations, Function definitions, main functionHow programs declare objects/functions and define executable structure.
Types, objects, and representationTypes, Objects, Arrays, Pointers, struct, union, enumWhat values and objects are, how they are laid out, and what operations are valid on them.
Expressions and operatorsExpressions, Arithmetic operators, Assignment operators, Comparison operators, Other operatorsHow computation is formed and how operators behave.
Statements and control flowStatements, if, for, do, while, switch, gotoHow control moves and how statements organize side effects and branching.
Initialization, conversion, and value modelInitialization, Conversions, Cast, Constant expressionsHow values are created, transformed, and interpreted.
Scope, linkage, lifetimeStorage duration, Lifetime, Scope, extern, inlineHow long objects exist, where names are visible, and how translation-unit boundaries matter.

# Practical Routes

I need to understand a type rule

Start from types when the issue is qualifiers, arrays, pointers, compatibility, arithmetic categories, or object representation.

I need an operator or expression rule

Start from expressions when the answer depends on precedence, conversions, side effects, or operand categories.

I need a control-flow rule

Start from statements when the problem is looping, branching, block rules, labels, or function exit behavior.

I need initialization or lifetime behavior

Start from initialization and lifetime when storage, zero-initialization, compound literals, or object existence is the core question.

# Adjacent Areas

BoundaryGo here
Your question is about macros, inclusion, or token rewriting before compilation.C preprocessor
You need library typedefs, limits, or standard type support utilities rather than language type rules.C types library
You are looking for keyword-by-keyword lookup instead of topic navigation.C keyword index
You actually need the C++ language reference instead of C semantics.C++ language