#include struct ord{ int x,y;} dt[2]={1,2,3,4};main(){ struct ord *p=dt;printf (“%d,”,++p->x); printf(“%d\n”,++p->y);}++p->x 如果就p->x

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/27 13:47:44
#include struct ord{ int x,y;} dt[2]={1,2,3,4};main(){ struct ord *p=dt;printf (“%d,”,++p->x); printf(“%d\n”,++p->y);}++p->x 如果就p->x

#include struct ord{ int x,y;} dt[2]={1,2,3,4};main(){ struct ord *p=dt;printf (“%d,”,++p->x); printf(“%d\n”,++p->y);}++p->x 如果就p->x
#include
struct ord
{ int x,y;} dt[2]={1,2,3,4};
main()
{ struct ord *p=dt;
printf (“%d,”,++p->x); printf(“%d\n”,++p->y);
}
++p->x 如果就p->x

#include struct ord{ int x,y;} dt[2]={1,2,3,4};main(){ struct ord *p=dt;printf (“%d,”,++p->x); printf(“%d\n”,++p->y);}++p->x 如果就p->x
晕 楼上别乱说了~p是个结构体指针好不
++p->x 是p指针自加后 所指向的x的值,
p->x 当然就是p所指向的x的值啦