// char无符号超范围的结果 #include <stdio.h> int main() { unsigned char a = 200; unsigned char b = 100; unsigned char c = 0; c = a + b; printf("%d %d\n", a + b, c); // c是无符号char,范围0~255,300超范围了,所以结果为44 return 0; } <img src="http://img.blog.csdn.net/20150508171802933?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvemhhb3lhcWlhbjU1Mg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
时间: 2024-10-08 09:26:54