You must log in or register to comment.
When the metric is lines of code
When the company tries to be cheeky and starts to count characters instead
Rename c to completelyUnimportantVariableThatISoLongBecauseIGetPaidMore
You forgot
++x
.The third one is just (x=x+1), because the middle bit is just always false and can be ignored.
What if int overflows? Is it still false?
Still false, thanks to compiler optimizations. Remember that integer overflow is UB. (unless you’re using unsigned int or a programming language which strictly defines integer overflow, possibly as an error)
P.S.: Assuming this is C/C++
No, because it’s UB, the compiler is free to do whatever, like making demons fly out of your nose