有以下程序段struct st{int x;int *y;)*pt;int a[]={l,2},b[]={3,4};struct st c[2]={10,a,20,b};pt=c;以下选项中表达式的值

5 查阅

有以下程序段

struct st

{int x;int *y;)*pt;

int a[]={l,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(26)C) 解析 : -> 的运算优先级比 ++ 高 , 此时 ,pt->=10, 执行自加运算后为 11 。

计算机二级