下列程序的输出结果是structabc{inta,b,c;};int main(void){structabcs[2]={{1,2,3},{4,5,6}};intt; t=s[0].a+s[1].b; printf("%d\n",t);return 0;}
查看答案
下面程序的输出结果为()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};