0% found this document useful (0 votes)
29 views

Operation Meaning Operation Meaning

The document describes various C/C++ operators, their meanings, associativity, and precedence. It lists unary, binary, and ternary operators and indicates whether their associativity is left to right or right to left. It also notes that the void expression can be used to specify the absence of a parameter.

Uploaded by

duchoa2202
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Operation Meaning Operation Meaning

The document describes various C/C++ operators, their meanings, associativity, and precedence. It lists unary, binary, and ternary operators and indicates whether their associativity is left to right or right to left. It also notes that the void expression can be used to specify the absence of a parameter.

Uploaded by

duchoa2202
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Operation = ? < > !

~ + * / % |

Meaning Assignment statement Selection Less than Greater than Logical not (true to false, false to true) 1s complement Addition Subtraction Multiply or pointer reference Divide Modulo, division remainder Logical or

Operation == <= >= != << >> ++ -&& || += -=

Meaning Equal to comparison Less than or equal to Greater than or equal to Not equal to Shift left Shift right Increment Decrement Boolean and Boolean or Add value to Subtract value to

& ^ .

Logical and, or address of Logical exclusive or Used to access parts of a structure

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

Multiply value to Divide value to Or value to And value to Exclusive or value to Shift value left Shift value right Modulo divide value to Pointer to a structure Associativity Left to right Right to left Left to right Left to right Left to right

Precedence Highest

Operators () []. -> ++(postfix) --(postfix) ++(prefix) --(prefix) * + << < == & ^ | / >> <= != > >= % ! ~ sizeof(type) +(unary) -(unary) &(address) *(dereference)

Left to right Left to right Left to right Left to right Left to right

&& || ? : = Lowest , += -= *= /= %= <<= >>= |= &= ^=

Left to right Left to right Right to left Right to left Left to right

To specify the absence of a parameter we use the expression void.

You might also like