Punctuation

From cppreference.com
< c‎ | language

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

:

...

?

::

  • 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