Datasheet
OPERATORS PRECEDENCE AND ASSOCIATIVITY
There are 15 precedence categories, some of them contain only one operator.
Operators in the same category have equal precedence.
If duplicates of operators appear in the table, the first occurrence is unary and the
second binary. Each category has an associativity rule: left-to-right ( ), or right-to-
left ( ). In the absence of parentheses, these rules resolve a grouping of expres-
sions with operators of equal precedence.
194
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroC PRO for AVR
CHAPTER 5
Precedence Operands Operators Associativity
15 2
() [] . ->
14 1
! ~ ++ -- + - * &
(type) sizeof
13 2
* / %
12 2
+ -
11 2
<< >>
10 2
< <= > >=
9 2
== !=
8 2
&
7 2
^
6 2
|
5 2
&&
4 2
||
3 3
?:
2 2
= *= /= %= += -= &=
^= |= <<= >>=
1 2
,