Don't modify a variable more than once in a single statement

This tip submitted by Ganga R Jaiswal on 2011-09-29 14:30:37. It has been viewed 6179 times.
Rating of 4.4 with 5 votes

Donít modify any variable more than once in a single statement:
You should not modify a variable more than once in a single statement. Compiler behavior is not defined by ANSI C for such scenario; it may produce different result on different compilers.

Example:

A = (b++) + (++b); //NOT OK: b has been modified twice
A = ++A; //NOT OK: A has been modified twice