c语言 有符号整型和无符号整型用%u输出结果都一样,而短整型又不同???
inta=-1;printf("a=%d\n",a);printf("a=%u\n",a);printf("\n");unsignedintb=-1;printf("b=...
int a=-1;
printf("a=%d\n",a);
printf("a=%u\n",a);
printf("\n");
unsigned int b=-1;
printf("b=%d\n",b);
printf("b=%u\n",b);
printf("\n");
short int c=-1;
printf("c=%d\n",c);
printf("c=%u\n",c);
printf("\n");
unsigned short int d=-1;
printf("d=%d\n",d);
printf("d=%u\n",d); 展开
printf("a=%d\n",a);
printf("a=%u\n",a);
printf("\n");
unsigned int b=-1;
printf("b=%d\n",b);
printf("b=%u\n",b);
printf("\n");
short int c=-1;
printf("c=%d\n",c);
printf("c=%u\n",c);
printf("\n");
unsigned short int d=-1;
printf("d=%d\n",d);
printf("d=%u\n",d); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询