+ 1
Guess the output and explain why?
2 Answers
+ 3
It is because operators precedence. If you try to calculate 3 - 2 * 4, the multiplication is evaluated first and then the subtraction, thus -2 * 4 = -8 and 3 - 8 = -5. If you want to change the order of operations you must use parentheses: (3 - 2) * 4 = 1 * 4 = 4.
+ 2
Write the macro as (i)*(j)