2 ms·
I don't follow, assuming short is half the size of int it would only overflow if most significant bits of both values are 1. Where did that 256^2 come from? It
by shultays 4y ago
I don't follow, assuming short is half the size of int it would only overflow if most significant bits of both values are 1. Where did that 256^2 come from? It wouldn't overflow if a and b were 256
I missed that the result would be promoted to signed int, which only most significant bits are set
- deleted 4y ago[deleted]