题目内容

若系统为int类型分配2个字节,char类型分配1个字节,double类型分配8个字节,则如有以下说明语句,则变量ss所占内存的字节数为( )。 struct s { int m; char c; double d; }ss;

A. 8
B. 1
C. 11
D. 2

查看答案
更多问题

已知学生记录描述为: struct student { int no; char name[20]; char sex; struct { int year; int month; int day; }birth; } struct student s; 设变量s中的“生日”应是“1984年11月11日”,下列对“生日”的正确赋值方式是( )。

A. year=1984 month=11; day=11;
B. birth.year=1984; birth.month=11; birth.day=11;
C. s.year=1984; s. month=11; s.day=11;
D. s.birth.year=1984; s.birth.month=11; s.birth.day=11;

以下程序的输出结果是______ # include void main() { char *s1,*s2,m; s1=s2=(char*)malloc(sizeof(char)); *s1=15; *s2=20; m=*s1+*s2; printf("%d\n",m); }

表达式:(int)((double)9/2)-(9)%2 的值是( )

A. 2
B. 3
C. 4
D. 5

有以下程序void fun(int p) { int d=2; p=d++; printf("%d",p); } main() { int a=1; fun(a); printf("%d\n",a); }程序运行后的输出结果是( )

A. 32
B. 12
C. 21
D. 22

答案查题题库