CCoding Style - Be careful with side effects
Be careful with side effects
- Operators like ++ have side effects: besides returning a value, they also modify an underlying variable.
- Side effects can be extremely convenient, but they can also cause trouble because the actions of retrieving the value and updating the variable might not happen at the same time.
- In C, the order of execution of side effects is undefined.