Operator(s)  Description  Associativity 

:: 
Scope resolution (C++ only)  N/A 
++  () [] . > 
Postfix increment and decrement Function call Array subscript Element selection by reference Element selection by pointer 
LefttoRight 
++  
Prefix increment and decrement  RighttoLeft 
= 
Assignment  RighttoLeft 
*= 
Multiplication Assignment  Right Left 
/= 
Division assignment  RighttoLeft 
+  
Unary plus and minus  RighttoLeft 
! 
Logical NOT  N/A 
(type) 
Type cast  RighttoLeft 
* 
Indirection (dereference)  N/A 
& 
Addressof (reference)  N/A 
sizeof() 
Sizeoftype  N/A 
sizeof 
Size of object  N/A 
delete 
Dynamic memory (de)allocation (C++ only)  N/A 
.* >* 
Pointer to member (C++ only)  LefttoRight 
% 
modulus (remainder)  LefttoRight 
* / 
Multiplication, division, and  LefttoRight 
<< >> 
Bitwise left shift and right shift  LefttoRight 
+  
Addition and subtraction  LefttoRight 
< <= > >= 
Relational “less than” and “less than or equal
to” Relational “greater than” and “greater than or equal to” 
LefttoRight 
== 
Relational “equal to”  LefttoRight 
!= 
and “not equal to”  LefttoRight 
&= 
Bitwise AND assignment  LefttoRight 
^ 
Bitwise XOR (exclusive or)  LefttoRight 
 
Bitwise OR (inclusive or)  LefttoRight 
&& 
Logical AND  LefttoRight 
 
Logical OR  LefttoRight 
c?t:f 
Ternary conditional (see ?:)  RighttoLeft 
= += = *= /= %= <<= >>= &= ^= = 
Direct assignment Assignment by sum and difference Assignment by product, dividend, and remainder Assignment by bitwise shift Assignment by bitwise AND, XOR, and OR 

, 
Comma  LefttoRight 