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 7027 times.Rating of 6.0 with 19 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 More tips Help your fellow programmers! Add a tip! |