LANGUAGE » C

Operators

Arithmetic

OperatorDescription
+Addition or unary plus
-Subtraction or unary minus
*Multiplication
/Division
%Remainder after division (modulo division)
++Increment
--Decrement

Assignment

OperatorExampleSame as
=a = ba = b
+=a += ba = a + b
-=a -= ba = a - b
*=a *= ba = a * b
/=a /= ba = a / b
%=a %= ba = a % b

Relational

OperatorDescription
==Equal to
!=Not equal to
>Greater than
<Less than
>=Greater than or equal to
<=Less than or equal to

Logical

OperatorDescription
&&AND
||OR
!NOT

Bitwise

OperatorDescription
&AND
|OR
^XOR
~Complement
<<Shift left
>>Shift right