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

admin2009-02-15  7

问题 以下程序的输出结果是    #include<stdio.h>    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

答案4

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

相关试题推荐
最新回复(0)