Showing content from https://en.cppreference.com/w/cpp/algorithm/../../cpp/../c/language/../language/punctuators.html below:
Punctuation - cppreference.com
These are the punctuation symbols in C. The meaning of each symbol is detailed in the linked pages.
[edit] {
}
[edit] [
]
[edit] #
[edit] ##
[edit] (
)
- In an expression, indicate grouping.
- Function call operator.
- In a
sizeof
, _Alignof
(since C11) , typeof
or typeof_unqual
(since C23) expression, delimit the operand.
- In an explicit cast, delimit the type-id.
- In a compound literal, delimit the type-id. (since C99)
- In a declaration or a type-id, indicate grouping.
- In a function declarator (in a declaration or a type-id), delimit the parameter list.
- In an
if
, switch
, while
, do-while
, or for
statement, delimit the controlling clause.
- In a function-like macro definition, delimit the macro parameters.
- In a function-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 a generic selection expression. (since C11)
- In an
_Atomic
type specifier, delimit the type-id. (since C11)
- In a static assertion declaration, delimit the operands. (since C11)
- In an
_Alignas
specifier, delimit the operand. (since C11)
- In an attribute, 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)
[edit] ;
-
- a statement (including the init-statement of a for statement)
- a declaration or struct-declaration-list
[edit] :
[edit] ...
[edit] ?
[edit] ::
- In an attribute, indicate attribute scope. (since C23)
- In a preprocessor prefixed parameter (used by #embed and __has_embed), indicate scope. (since C23)
[edit] .
[edit] ->
[edit] ~
[edit] !
[edit] +
[edit] -
[edit] *
[edit] /
[edit] %
[edit] ^
[edit] &
[edit] |
[edit] =
[edit] +=
[edit] -=
[edit] *=
[edit] /=
[edit] %=
[edit] ^=
[edit] &=
[edit] |=
[edit] ==
[edit] !=
[edit] <
-
[edit] >
-
[edit] <=
[edit] >=
[edit] &&
[edit] ||
[edit] <<
[edit] >>
[edit] <<=
[edit] >>=
[edit] ++
[edit] --
[edit] ,
-
[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
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4