Some questions on arithmetic operations

  1. What is the difference in the value of:
    x + y++
    x + ++y
    
    The second is one greater than the first, since y is incremented before being used in the addition (pre-increment).
  2. What two factors can influence the normal left to right order of evaluation?
    Parentheses and operator precedence.

Answers to these questions.


Back to notes on arithmetic operators.