Comparison of signed and unsigned numbers

If, for example, say if (-1> 2). This condition is true because the signed value (-1) is converted to the unsigned value that I know. But what I want to know is how it is transformed? And if the value is changed, what will it be?

+4
source share
1 answer

If, for example, say if (-1> 2). This condition is true because the Signed value (-1) is converted to the unsigned value that I know.

No, it is not.

(, @KeithThompson, , - , ) int (.. signed int), @amdn , ( ). if 0 ( false).

, -1 > 2U, -. - ( ) int unsigned, , , , , 2U ( 2 ). unsigned int , - ( ) .

+4

All Articles