用vc++6.0编译的,问为什么第二个a的结果是1.7777777777,short不是只有2个字节吗?
#include<stdio.h>voidmain(){shorta=-1;unsignedshortb=65534;printf("%d,%o,%x,%u\n",a,a...
#include <stdio.h>
void main()
{
short a=-1;
unsigned short b=65534;
printf("%d,%o,%x,%u\n",a,a,a,a);
printf("b=%d\n",b);
} 展开
void main()
{
short a=-1;
unsigned short b=65534;
printf("%d,%o,%x,%u\n",a,a,a,a);
printf("b=%d\n",b);
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询