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.
# Start Here
Declarations and definitions
Start here when the question is about introducing names, forming declarators, defining functions, or understanding what a declaration means.
Declarations · Function declarations · Function definitions · typedef
Expressions and operators
Use this route for precedence, evaluation, operators, conversions, and value computation rules.
Expressions · Conversions · Operator precedence · Evaluation order
Statements and control flow
Choose this route for `if`, loops, `switch`, `goto`, `return`, and how execution moves through a C program.
Statements · if · for · switch
Types and objects
Start here when the question is about type categories, object representation, arrays, pointers, structs, unions, or qualifiers.
Types · Arithmetic types · Pointers · struct
Initialization and lifetime
Use this route for object creation, initialization forms, compound literals, lifetime rules, and storage duration.
Initialization · Array initialization · Compound literals · Lifetime
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 about | Start with | Typical follow-ups |
|---|---|---|
| How a name, object, or function is introduced | Declarations | Identifiers, Function declarations, typedef |
| What an expression means or how operators group | Expressions | Conversions, Operator precedence, Evaluation order |
| How program flow branches, loops, or exits | Statements | if, while, for, return |
| Which type rules apply to an object or expression | Types | Arithmetic types, Compatible type, const, restrict, volatile |
| How an object is initialized or when its lifetime begins | Initialization | Scalar initialization, Struct initialization, Lifetime |
| Whether a value converts implicitly or explicitly | Conversions | Cast, Value categories, Boolean conversion |
| Where a name is visible or how long an object exists | Storage duration | Scope, File scope, Thread storage duration |
# Core Language Areas
| Area | Key pages | Use it for |
|---|---|---|
| Declarations and program structure | Declarations, Function definitions, main function | How programs declare objects/functions and define executable structure. |
| Types, objects, and representation | Types, Objects, Arrays, Pointers, struct, union, enum | What values and objects are, how they are laid out, and what operations are valid on them. |
| Expressions and operators | Expressions, Arithmetic operators, Assignment operators, Comparison operators, Other operators | How computation is formed and how operators behave. |
| Statements and control flow | Statements, if, for, do, while, switch, goto | How control moves and how statements organize side effects and branching. |
| Initialization, conversion, and value model | Initialization, Conversions, Cast, Constant expressions | How values are created, transformed, and interpreted. |
| Scope, linkage, lifetime | Storage duration, Lifetime, Scope, extern, inline | How 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
| Boundary | Go 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 |