Types#
C’s type system is small and concrete. Fixed-width arithmetic types, pointers (typed), arrays (with implicit decay to a pointer), structs and unions (no methods), enums (named integers), and function types. The compiler does not infer; the operator writes every type explicitly.
For literals, see Syntax. For operators, see Operators.
Pages#
char, int family, float / double,
bool, void.
<stdint.h>: int8_t..``int64_t``, size_t,
intptr_t, ptrdiff_t.
Null-terminated char arrays; safe APIs.
Fixed size; decay to pointer; VLA caveats.
Typed addresses; pointer arithmetic; const placement.
Records; designated initialisers; opaque types.
Overlaid fields; tag-and-union pattern.
Named integer constants.
Function-pointer types; typedef for callbacks.
(T)expr; integer promotion; usual arithmetic conversions.
References#
Syntax for literals and the preprocessor.
Operators for
sizeof,&,*,->.Functions for function-pointer types and calling conventions.
Errors for
errnotyping.