这牵涉到内存对齐的因素

英者自知,雄者自胜
2007-11-05 14:17

2007-11-05 14:20
#include "stdio.h"
#include "conio.h"
main()
{
char *p;
int *q;
printf("%d\n",sizeof(*p));
printf("%d\n",sizeof(*q));
p=(char*)q;
printf("%d\n",sizeof(*p));
getch();
}
有警告,看看结果就行.

2007-11-05 14:43
恩,明白了,谢谢
2007-11-06 12:07