Quote Originally Posted by BEN10 View Post
Let me explain it with a 16bit arithmetic. The value of INT_MIN for it will be -32768 and INT_MAX will be 32767. Thus when you negate INT_MIN you get 32768 but this can't be represented in it coz the maximum value of INT is 32767, thus it'll go to the other side and print the corresponding value which in this case is -32768(the same as INT_MIN). Would it had been 32769 it would have printed -32767 and so on.
Oh! Thanks, this made it preety clear now.