The prefix ++i
and suffix i++
operators affect the order in which the statement is evaluated. With the prefix ++i
, the value of i
is incremented, and that is what is used. But with the suffix i++
, the original value of i
is used, and then it is incremented for anything following that line.