移位操作符(<,>)算术还是逻辑在C中?在C中,换挡操作符(<<, >>算术还是逻辑?
3 回答
幕布斯7119047
TA贡献1794条经验 获得超8个赞
signed int x1 = 5;assert((x1 >> 1) == 2);signed int x2 = -5;assert((x2 >> 1) == -3); unsigned int x3 = (unsigned int)-5;assert((x3 >> 1) == 0x7FFFFFFD);
- 3 回答
- 0 关注
- 994 浏览
添加回答
举报
0/150
提交
取消