Unsigned and Signed Values in C (Output)

前端 未结 5 1187
余生分开走
余生分开走 2020-12-15 01:21
signed int x = -5;
unsigned int y = x;

What is the value of y? How is this so?

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-15 01:28

    y=0xfffffffb it's the binary representation of -5 (two's complement)

提交回复
热议问题