#include <stdio.h> int main() { char a = 128;//128=127+1=-1;//因为char类型最大能保存的范围为-128~127 //1000 0000 //11111111 11111111 11111111 1000 0000 printf("%u\n", a); system("pause"); return 0; }
#include <stdio.h> int main() { char a = -1;//128=127+1=-1; //1000 0000 //11111111 11111111 11111111 1000 0000 printf("%u\n", a); system("pause"); return 0; }
#include <stdio.h> int main() { char a = -1; //1000 0000 //11111111 11111111 11111111 1000 0000 printf("%d\n", a); system("pause"); return 0; }
时间: 2024-10-07 15:08:26