Punctuators in C Programming

0

Punctuators in C programming are symbols that have independent syntactic and semantic significance. They play a crucial role in defining the structure of a C program and in performing various operations.

The syntax for a punctuator in C is as follows:

punctuator: one of

[ ] ( ) { } . ->

++ -- & * + - ~ !

/ % << >> < > <= >= == != ^ | && ||

? : ; ...

= *= /= %= += -= <<= >>= &= ^= |=

, # ##

<: :> <% %> %: %:%:

A punctuator may specify an operation to be performed, which in turn may yield a value or a function designator, produce a side effect, or some combination thereof. In such cases, it is known as an operator. An operand is an entity on which an operator acts.

In all aspects of the language, the six tokens `<: :> <% %> %: %:%:` behave, respectively, the same as the six tokens `[ ] { } # ##` except for their spelling. These tokens are sometimes called "digraphs". Thus `[` and `<:` behave differently when "stringized" (see 6.10.3.2), but can otherwise be freely interchanged.

Tags

Post a Comment

0Comments
Post a Comment (0)