unsigned int 型%d打印为负数

内存中为二进制,当最高位为1时使用%d则为负数,这时应该用%u,使用%x时可以看到最高位是否为1.

猜你喜欢

转载自blog.csdn.net/qq_21640423/article/details/90712861