W3cubDocs

/C

Punctuation

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

{ }

[ ]

#

##

( )

;

  • Indicate the end of
    • a statement (including the init-statement of a for statement)
    • a declaration or struct-declaration-list
  • Separate the second and third clauses of a for statement.

:

...

?

::

  • In a attribute, indicate attribute scope. (since C23)

.

->

~

!

+

-

*

/

%

^

&

|

=

+=

-=

*=

/=

%=

^=

&=

|=

==

!=

<

>

<=

>=

&&

||

<<

>>

<<=

>>=

++

--

,

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

See also

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

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/c/language/punctuators