请把我分析一下这个程序,struct st {int n; struct st *next;};static struct st a[3]={5,&a[1],7,&a[2],9,'\0'},*p;p=&a[0];则表达式_____的值是6.A)p + + ->n B) p->n + + C) (*p).n + + D) + + p->n

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/30 11:26:24

请把我分析一下这个程序,struct st {int n; struct st *next;};static struct st a[3]={5,&a[1],7,&a[2],9,'\0'},*p;p=&a[0];则表达式_____的值是6.A)p + + ->n B) p->n + + C) (*p).n + + D) + + p->n
请把我分析一下这个程序,
struct st {int n; struct st *next;};
static struct st a[3]={5,&a[1],7,&a[2],9,'\0'},*p;
p=&a[0];
则表达式_____的值是6.
A)p + + ->n B) p->n + + C) (*p).n + + D) + + p->n

请把我分析一下这个程序,struct st {int n; struct st *next;};static struct st a[3]={5,&a[1],7,&a[2],9,'\0'},*p;p=&a[0];则表达式_____的值是6.A)p + + ->n B) p->n + + C) (*p).n + + D) + + p->n
正D
p指向结构体数组的第一个元素(它的值是5)
+ + p->n的意思就是对其值执行自增操作,且为前置自增,因此为6