2楼的代码,如果用-Wall编译会有警告,m和m%100 与前面的格式"%u,%u"不一致
test.c:7: warning: unsigned int format, different type arg (arg 2)
test.c:7: warning: unsigned int format, different type arg (arg 3)
[Quote=引用 2 楼 lvjing1210 的回复:]
比如,我定义变量为 unsigned long long m;
m=889615;
printf("%u,%u",m,m%100);
输出结果为889615,0,这个是怎么回事啊?另外测试了m/100,以及m>>32的输出结果也都不对,请高人指点下啊
[/Quote]
printf unsinged long long 要用%llu