Electrical and Computer Engineering
22 of 48
UAH
CPE 112
Compound Arithmetic Expressions
•Precedence Rules
–  Highest: Unary +, Unary –, Parentheses
–  Middle *, /, %
–  Lowest +, -
•Associativity is from left to right
–   int1 – int2 + int3
–is evaluated
–   (int1 – int2) + int3
•