When applied to x unary operator - returns a value of 0-x. But value y=2147483648 (which is 0b10000000000000000000000000000000 ) will not fit into the range of type int as a positive value: due to it's first bit it will be considered as a negative value, and will be equal to x. Therefore, y=-x, y=x --> x=-x

Login in to like

Login in to comment