These are the punctuation symbols in C. The meaning of each symbol is detailed in the linked pages.
- In an expression,indicate grouping.
- Function call operator.
- In a
sizeof,_Alignof(since C11),typeof ortypeof_unqual(since C23) expression, delimit the operand. - In anexplicit cast, delimit the type-id.
- In acompound literal, delimit the type-id.(since C99)
- In adeclaration or atype-id, indicate grouping.
- In afunction declarator (in adeclaration or atype-id), delimit the parameter list.
- In an
if,switch,while,do-while, orfor statement, delimit the controlling clause. - In afunction-like macro definition, delimit the macro parameters.
- In afunction-like macro invocation, delimit the macro arguments or prevent commas from being interpreted as argument separators.
- Part of a
defined,__has_include,__has_embed or__has_c_attribute(since C23) preprocessing operator. - Part of ageneric selection expression.(since C11)
- In an
_Atomic type specifier, delimit the type-id.(since C11) - In astatic assertion declaration, delimit the operands.(since C11)
- In an
_Alignas specifier, delimit the operand.(since C11) - In anattribute, delimit the attribute arguments.(since C23)
- In a bit-precise integer type name (_BitInt(N)), delimit the size.(since C23)
- Part of__VA_OPT__ replacement in a variadic macro definition.(since C23)
- In a preprocessor parameter used in#embed directives and__has_embed preprocessing expressions, delimit the preprocessor parameter clause.(since C23)
- In anattribute, indicate attribute scope.(since C23)
- In a preprocessor prefixed parameter (used by#embed and__has_embed), indicate scope.(since C23)
[edit]References
- C23 standard (ISO/IEC 9899:2024):
- 6.4.6 Punctuators (p: 68-69)
- C17 standard (ISO/IEC 9899:2018):
- 6.4.6 Punctuators (p: 52-53)
- C11 standard (ISO/IEC 9899:2011):
- 6.4.6 Punctuators (p: 72-73)
- C99 standard (ISO/IEC 9899:1999):
- 6.4.6 Punctuators (p: 63-64)
- C89/C90 standard (ISO/IEC 9899:1990):
[edit]See also