The increment operator `` ++'' increments the named variable. For example, the statement `` a++'' is equivalent to `` a= a+1'' or `` a+= 1''.
A statement that uses an increment operator has a value. For example, the statement
a= 3; printf("a=%d a+1=%d\n", a, ++a);
will display the text `` a=3 a+1=4.''
If the increment operator comes after the named variable, then the value of the statement is calculated after the increment occurs. So the statement
a= 3; printf("a=%d a+1=%d\n", a, a++);
would display `` a=3 a+1=3'' but would finish with a set to 4.
The decrement operator `` --'' is used in the same fashion as the increment operator.