struct st{int x;int*y;}*p;inta[]={1,2},b[]={3,4};struct st c[2]={10,a,20,b};pt=c;以下选项中表达式的值为11的是:A.*p->y B.pt->x C.++pt->x D.(pt++)->x

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 11:17:26
struct st{int x;int*y;}*p;inta[]={1,2},b[]={3,4};struct st c[2]={10,a,20,b};pt=c;以下选项中表达式的值为11的是:A.*p->y        B.pt->x          C.++pt->x              D.(pt++)->x

struct st{int x;int*y;}*p;inta[]={1,2},b[]={3,4};struct st c[2]={10,a,20,b};pt=c;以下选项中表达式的值为11的是:A.*p->y B.pt->x C.++pt->x D.(pt++)->x
struct st{int x;int*y;}*p;inta[]={1,2},b[]={3,4};struct st c[2]={10,a,20,b};pt=c;
以下选项中表达式的值为11的是:
A.*p->y B.pt->x C.++pt->x D.(pt++)->x

struct st{int x;int*y;}*p;inta[]={1,2},b[]={3,4};struct st c[2]={10,a,20,b};pt=c;以下选项中表达式的值为11的是:A.*p->y B.pt->x C.++pt->x D.(pt++)->x
答案为c
pt->x=10;
++pt->x=11;