题目内容

以下选项中,能定义s为合法的结构体变量的是_____。

A. typedef struct abc{double a; char b[10]; } s;
B. struct {double a; char b[10];
C. struct ABC {double a; char b[10]; };ABC s;
D. typedef ABC {double a;har b[10]; };ABC s;

查看答案
更多问题

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

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

下面程序的输出结果是_____。 typedef struct {long x[2]; short y[4]; char z[8]; }MYTYPE; MYTYPE a; main() { printf("%d\n",sizeof(a));}

A. 2
B. 8
C. 14
D. 24

以下程序的运行结果是_____。typedef union{long a[2];float b[4];char c[8];} mytype;mytype our;main(){printf(“%d\n”, sizeof(our));}

下面程序的输出是_____。#includeunion pw{int i;char ch[2];}a;void main(){a.ch[0]=13;a.ch[1]=0;printf("%d\n",a.i);}

答案查题题库