Don't modify a variable more than once in a single statementThis tip submitted by Ganga R Jaiswal on 2011-09-29 14:30:37. It has been viewed 2385 times.
Rating of 5.3 with 4 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.
A = (b++) + (++b); //NOT OK: b has been modified twice
A = ++A; //NOT OK: A has been modified twice
Help your fellow programmers! Add a tip!