题目内容

有以下程序:#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

若有下面的说明和定义,则sizeof(struct aa)的值是( )。struct aa{int r1;double r2;float r3;union uu{char u1[5];long u2[2];} ua;} mya;

A. 30
B. 29
C. 24
D. 32

假设有以下定义:typedef union{long i;int k[5];char c;} DATE;struct date{int cat;DATE cow;double dog;} too;DATE max;那么语句 printf("%d",sizeof(struct date)+sizeof(max)); 的执行结果是( )。

A. 52
B. 30
C. 18
D. 8

答案查题题库