Knowledge Base
Authentication is disabled (development mode).

c++ operator precedence

Edit

c++ operator recedence

Highest Precedence
++	Post-increment =>
--	Post-decrement
( )	Function call
[ ]	Array element
->	Pointer to structure member
.	Structure or union member
++	Pre-increment Right to left
--	Pre-decrement
!	Logical NOT
~	Bitwise NOT
-	Unary minus
+	Unary plus
&	Address
*	Indirection
sizeof	Size in bytes
new	Allocate program memory
delete	Deallocate program memory
(type)	Type cast [for example, (float) i]
.*	Pointer to member (objects) =>
->*	Pointer to member (pointers)
*	Multiply =>
/	Divide
%	Remainder
+	Add =>
-	Subtract
<<	Left shift =>
>>	Right shift
<	Less than =>
<=	Less than or equal to
>	Greater than
>=	Greater than or equal to
==	Equal =>
!=	Not equal
&	Bitwise AND =>
^	Bitwise exclusive OR =>
|	Bitwise OR =>
&&	Logical AND =>
||	Logical OR =>
? :	Conditional Right to left
=	Assignment Right to left
*=	Compound assignment
/=	Compound assignment
%=	Compound assignment
+=	Compound assignment
-=	Compound assignment
<<=	Compound assignment
>>=	Compound assignment
&=	Compound assignment
^=	Compound assignment
|=	Compound assignment
,	Comma =>
Lowest Precedence