下面程序的输出结果为()structst{intx;int*y;}*p;intdt[4]={10,20,30,40};structstaa[4]={50,&dt[0],60,&dt[1],70,&dt[2],80,&dt[3]};int main(void){ p=aa;printf("%d\n",++p->x);printf("%d\n",(++p)->x);printf("%d\n",++(*p->y));rerurn 0;}
A. 506010
B. 506011
C. 516021
D. 607080
查看答案
以下程序的输出是#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],};int main(void){ p=aa;printf("%d\n",++(p->x));return 0;}
A. 10
B. 11
C. 51
D. 60
以下程序的运行结果是#include int main(void){ struct date{int year,month,day;}today;printf("%d\n",sizeof(struct date));return 0;}
A. 5
B. 8
C. 10
D. 12
若有以下结构体定义,则________是正确的引用或定义。struct example{ int x;int y;}v1;
A. example.x=10
B. example v2.x=10
C. struct v2;v2.x=lO
D. struct example v2={10};
有以下程序#include struct STU{ char name[10];int num;};void f1(struct STU c){ struct STU b={"LiSiGuo",2042};c=b;}void f2(struct STU *c){ struct STU b={"SunDan",2044};*c=b;}int main(void){ struct STU a={"YangSan",2041},b={"WangYin",2043};f1(a);f2(&b);printf("%d %d",a.num,b.num);return 0;}
A. 20412044
B. 20412043
C. 20422044
D. 20422043