C语言:结构体与地址运算问题,不知道怎么算,谁帮忙指点一二,谢谢了!!
#include<stdio.h>#include<stdlib.h>
struct
{
long num;
char *name;
short i;
char j;
short a[5];
}*p;
int main()
{
printf("p+0x200=%p\n",p+0x200);
printf("(unsigned long)p+0x200=%p\n",(unsigned long)p+0x200);
printf("(char *)p+0x200=%p\n",(char *)p+0x200);
system("pause");
return 0;
}
输出结果分别是00003000,00000200,00000200,
为什么啊??