<P> Since the increment / decrement operator modifies its operand, use of such an operand more than once within the same expression can produce undefined results . For example, in expressions such as x - + + x, it is not clear in what sequence the subtraction and increment operations should be performed . Such expressions generally invoke undefined behavior, and should be avoided . </P> <P> The following C code fragment illustrates the difference between the pre and post increment and decrement operators: </P> <P> The post-increment operator is commonly used with array subscripts . For example: </P> <P> Likewise, the post-decrement operator is commonly used with pointers: </P>

Difference between pre increment and post increment in c language