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

admin2010-09-05  29

问题 有下列程序段:    struct St    {int x;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

答案4

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

最新回复(0)