为什么%x和%o被视为unsigned int?

时间:2011-08-21 04:06:14

标签: c

ram@ram:~/Desktop$ cc sample.c 

sample.c: In function ‘main’:

sample.c:7: warning: format ‘%o’ expects type ‘unsigned int’, but argument 2 has type ‘long int’

1 个答案:

答案 0 :(得分:7)

因为它们被指定为采用unsigned int

(不,真的。)