42
eh … OK then. 16.
Could also be written in a more classical way like:
8 8 ( 1 + 3 ) 8 + 24 32
--- (1 + 3) = -------------- = ---------- = ----- = 16
2 2 2 2
One could of course also take the simpler / more direct? approach with normal precedence and associativity, (here from K&R p. 53 (p. 66 in PDF))
* Parenthesis have highest precedence in the given exercise
* Division and multiplication have same, and are applied left to right
8 ∕ 2 × (1 + 3)
= 8 / 2 × 4
= 4 × 4
= 16
or, if you like:
8 ∕ 2 × (1 + 3)
= (8 / 2) × (1 + 3)
= 4 × 4
= 16
or:
8 ∕ 2 × (1 + 3)
= 4 × (1 + 3)
= 4 + 12
= 16
etc.