成员变量间地址是连续的,数组object[0]末尾的成员变量的地址和数组object[1]开头的成员变量的地址也是连续的,所占地址大小为类型大小
#include"stdio.h"
int main()
{
struct Object{
int tall;
int length;
};
struct Object object[2];
struct Object *p=object;
//p=(struct abc *)malloc(sizeof(struct abc));
object[0].tall = 1;
object[0].length = 2;
object[1].tall = 3;
object[1].length = 4;
printf("%d\n",&(p+1)->tall);
printf("%d\n",&p->length);
}