以下程序的输出结果是 #include struct st { int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[0],60,&dt[

admin2010-12-10  22

问题 以下程序的输出结果是
#include
struct st
{ int x;int *y;}*p;
  int dt[4]={10,20,30,40};
  struct st aa[4]={50,&dt[0],60,&dt[0],60,&dt[0],60,&dt[0],};
main()
{   p=aa;
printf("%d\n",++(p->x));}

选项 A、10
B、11
C、51
D、60

答案C

解析 考查结构体成员数据的引用方法。通过指针来引用结构体成员的方法是(指针变量)->结构体成员名。
转载请注明原文地址:https://kaotiyun.com/show/WhPp777K
0

最新回复(0)