#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/12/19 00:33:16
#includestructord{intx,y;}dt[2]={1,2,3,4};main(){structord*p=dt;printf(“%d,”,++p->x);printf(“%d\n”,+

#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的值啦