a);prinff("%d,",(++P)->a);printf("%d\n",++(*P->b));
}/*P->a的值为50,++P->a的值为51;(++p) - 高级语言程序设计(一)(00342) - 专业知识收录平台">
a);prinff("%d,",(++P)->a);printf("%d\n",++(*P->b));
}/*P->a的值为50,++P->a的值为51;(++p) - 高级语言程序设计(一)(00342) - 专业知识收录平台">
阅读下列程序,写出程序运行的输出结果。
structs{inta;int*b;}*p;
intc[]={10,20,30,40};
stmctsd[]={50,c,60,c+1,70,c+2,80,c+3};
voidmain()
{p=d;
printf("%d,",++P->a);prinff("%d,",(++P)->a);printf("%d\n",++(*P->b));
}/*P->a的值为50,++P->a的值为51;(++p)->a中P自加后指向d[1],因此值为60;(*P->b)为20,自加后为21*/
输出结果: 51,60,2l
扫描二维码免费使用微信小程序搜题/刷题/查看解析。
版权声明:本文由翰林刷题小程序授权发布,如需转载请注明出处。