题目内容

以下程序的运行结果是#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

有以下程序#include struct S{ int n;int a[20];};void f(int *a,int n){ int i;for(i=0;i

A. 2,4,3,9,12,12,11,11,18,9,
B. 3,4,2,7,9,8,6,5,11,10,
C. 2,3,1,6,8,7,5,4,10,9,
D. 1,2,3,6,8,7,5,4,10,9,

“结构体名”和“结构体成员名”都是用户定义的标识符。

A. 对
B. 错

答案查题题库