各位高手大神!为什么这段代码的结果会错误啊!?求指教!求凌辱!
#include <stdio.h>int main (void)
{
signed char a=120;
short b=3000;
int c=500000;
long d=500000L;
long long e=1234567891LL;
unsigned char f=20U;
unsigned short g=6000U;
unsigned int h=20000U;
unsigned long i=600000UL;
unsigned long long j=555555ULL;
printf("a=%d\nb=%d\nc=%d\nd=%d\ne=%d\n\nf=%u\ng=%u\nh=%u\ni=%u\nj=%u\n.",a,b,c,d,e,f,g,h,i,j);
return 0;
}
运行后显示的输出结果是:
a=120
b=3000
c=500000
d=500000
e=1234567891
前面的整型变量都没出错 可是后面的无符号整型变量就开始有问题了。。
f=0
g=20
h=6000
i=20000
j=600000
这是怎么回事,是我用错了格式符吗?还是怎样的?菜鸟求助大神指点!