char的大小问题
#include<fcntl.h>#include<stdio.h>
int main()
{
char a= 0xff;
char *buf;
buf= &a;
printf("%x\n", *buf);
}
输出是ffffffff, 大家都知道char的大小是一个字节,为什么输出会是个32位的数呢? 有谁能帮忙解释一下,谢谢了!!
2010-08-02 10:14
2010-08-02 10:20
2010-08-02 10:22
2010-08-02 10:33
2010-08-02 10:41
2010-08-02 10:42