以下程序的输出是( )。 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],}; main() {p=aa; printf("%d\n",++(p-->x)); }
A.10
B.11
C.51
D.60
A.10
B.11
C.51
D.60
第1题
以下程序用来输出结构体变量ex所占存储单元的字节数,请填空。
struct st
{char name[20];double score;};
main()
{struct st ex;
printf("ex size:%d\n",sizeof(______);
}
第2题
A.10
B.11
C.51
D.60
第3题
第4题
第5题
A.200.00
B.270.00
C.280.00
D.285.00
第6题
A.10
B.20
C.30
D.40
第7题
A.4
B.5
C.6
D.0
第8题
有以下程序: struct STU(char name[10]; int hum; }; void f1(struct STU c) {struct STU b={“LiSiGuo”,2042}; c=b; } void f2(struct STU*C) } {struct STU b={“SunDan”,2044}; *c=b; ) main() {struct STU a={“YangSan”,2041),b={“WangYin”,2043}; f1(a);f2(&b); printf(“%d%d\n”,a.num,b.num); ) 执行后的输出结果是()。
A.2041 2044
B.2041 2043
C.2042 2044
D.2042 2043
第9题
有以下程序: Struct STU{ char name[10]; int num; }, void fl(struct STU C) {struct STU b={"LiSiGuo",2042}; c=b; ) void f2(struct STU*c) {struct STU b={"SunDan",2044l; *c=b; ) main() {struct STU a={"YangSan",2041),b={"WangYin",2043}; f1(a);f2(&b); printf(“%d%d\n”,a.num,b.num); ) 执行后输出结果是()。
第10题