4 ms·
Can the people downvoting this comment provide a reason why? It seems perfectly reasonable to me.
by saagarjha 8y ago
Can the people downvoting this comment provide a reason why? It seems perfectly reasonable to me.
- deleted 8y ago[deleted]
- jcelerier 8y agoInteger overflow is undefined behaviour so an input for instance of 2147483647 and 1 makes the program invalid.
- saagarjha 8y agoSure, but the program is well-defined on inputs that do not cause it to overflow. It does not perform undefined behavior in those cases, so it's correct given those preconditions.