++

--

The ++ and -- operators increment or decrement a variable's value by 1. The implementation is limited to the case of statements formed by a single variable name and the operator, e.g. i++, ++i, i-- and --i. In that regard, the post and pre operators work the same way.


Example


for( i=1; i<n; i++ )

   s = s + i;