Namespaces
Variants
Views
Actions

Punctuation

From cppreference.com
< c‎ | language

These are the punctuation symbols in C. The meaning of each symbol is detailed in the linked pages.

Contents

[edit] { }

[edit] [ ]

[edit] #

[edit] ##

[edit] ( )

[edit] ;

  • Indicate the end of
  • 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)

[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

  • 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):
  • 3.1.6 Punctuators

[edit] See also

Alternative representations (C95) alternative spellings for certain operators[edit]
C++ documentation for Punctuation