有下列程序段: struct st {intx;int*y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 下列选项中表达式的值为11的是

admin2013-02-23  25

问题 有下列程序段:    struct st    {intx;int*y;}*pt;    int a[]={1,2},b[]={3,4};    struct st c[2]={10,a,20,b};    pt=c;    下列选项中表达式的值为11的是(    )。   

选项 A、*pt->y     
B、pt->x
C、++pt->x     
D、(pt++)->x

答案C

解析  由题目的已知条件可知,Pt指向结构体数组c[2]的第一元素c[O],所以pt->x=10,执行自加运算后为11。
转载请注明原文地址:https://kaotiyun.com/show/1ZPp777K
0

随机试题
最新回复(0)