This is a reference of the core C language constructs.
Basic concepts
Comments ASCII chart Character sets and encodings Translation phases Punctuation Identifier - Scope - Lifetime Lookup and Name Spaces Type - Arithmetic types Objects and Alignment Themain function As-if rule Undefined behavior Memory model and Data races
main
Keywords
Preprocessor
#if -#ifdef -#ifndef -#elif#elifdef -#elifndef(C23)#define -# -###include -#pragma#line -#error#warning(C23) -#embed(C23)
#if
#ifdef
#ifndef
#elif
#elifdef
#elifndef
#define
#
##
#include
#pragma
#line
#error
#warning
#embed
Statements
if -switchforwhile -do-whilecontinue -breakgoto -return
if
switch
for
while
do
continue
break
goto
return
Expressions
Value categories Evaluation order and sequencing Constants and literals Integer constants Floating constants Character constants true/false(C23) nullptr(C23) String literals Compound literals(C99) Constant expressions Implicit conversionsOperators Member access and indirection Logical - Comparison Arithmetic - Assignment Increment and Decrement Call, Comma, Ternary sizeof -alignof(C11) Cast operators Operator precedence Generic selection(C11)
true
false
nullptr
sizeof
alignof
Initialization
Scalar Array Structure/Union
Declarations
Pointers - Arrays Enumerations Storage duration and Linkageconst -volatile -restrict(C99)struct -union - Bit-fieldsalignas(C11) -typedefstatic_assert(C11) Atomic types(C11) External and tentative definitions Attributes(C23)
const
volatile
restrict
struct
union
alignas
typedef
static_assert
Functions
Function declaration Function definitioninline(C99)_Noreturn(C11)(deprecated in C23) Variadic arguments
inline
_Noreturn
Miscellaneous
History of C Conformance Inline assembly Signal handling Analyzability(C11)