struct H
{int x;int *y;int xy[2];}
void f(struct H*p)
{(p+1)->x=10;
(*p).x=20;
(*p).y=&((*(p+1)).x);
(*(p+1)).y=&(p->x);
}
main()
{struct H*q=xy;
f(q);
printf("%d,%d\n",*(q->y),*(xy[0].y));
}
【正确答案】:10,10
struct H {int x;int *y;int xy[2];}void f(struct H*p) {(p+1)->x=1
- 2024-11-06 17:16:34
- 高级语言程序设计(13013)