题目内容

以下程序的输出结果是( )。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]};void main(){p=aa;printf("%d\n",++(p->x));}

A. 10
B. 11
C. 51
D. 60

查看答案
更多问题

以下程序的输出结果是( )。struct HAR{int x, y;struct HAR *p;} h[2];void main(){h[0].x=1;h[0].y=2;h[1].x=3;h[1].y=4;h[0].p = &h[1], h[1].p = h;printf("%d%d\n", (h[0].p)->x, (h[1].p)->y);}

A. 12
B. 23
C. 14
D. 32

有以下程序:#include struct stu{int num;char name[10];int age;};void fun(struct stu *p){printf("%s\n",(*p).name);}void main(){struct stu students[3]={{9801,"Zhang",20},{9802,"Wang",19},{9803,"Zhao",18}};fun(students+2);}输出结果是( )

A. Zhang
B. Zhao
C. Wang
D. 18

下面程序的输出是( )。typedef union{long x[2];int y[4];char z[8];} MYTYPE;MYTYPE them;void main(){printf("%d\n", sizeof(them));}

A. 32
B. 16
C. 8
D. 24

若有定义:struct KeyWord{char Key[20];int ID;}kw[] = { "void", 1, "char", 2, "int", 3, "float", 4, "double", 5 };则printf("%c,%d\n", kw[3].Key[0], kw[3].ID);语句的输出结果为( )

A. i 3
B. n 3
C. f 4
D. l 4

答案查题题库