I was going through the examples in K&R, and stumbled upon this bit of code:
celcius=5 * (fahr-32) / 9;
The author says that we can't use 5/9 since integer division truncation will lead to a value of 0.
The program however, outputs 17 as answer when fahr=0. By my calculations, (0-32)/9 should lead to -3 (due to truncation) and then -3*5 = -15, and NOT -17. Why does this happen?