题目内容

定义以下结构体类型struct s{int a;char b[4];float f;};则语句printf("%d",sizeof(struct s))的输出结果为

A. 3
B. 12
C. 8
D. 9

查看答案
更多问题

定义以下结构体类型struct s{ int x;float f;}a[3];语句printf("%d",sizeof(a))的输出结果为

A. 3
B. 12
C. 24
D. 16

若有下列定义:struct b{ float a[5];int d;}x; 则变量x在内存中所占的字节为下列哪一个:

A. 6
B. 10
C. 24
D. 30

struct contry{int num;char name[20];}x[5]={1,"China",2,"USA",3,"France",4,"Englan",5,"Spanish"};main(){int i;for (i=3;i<5;i++)printf("%d%c",x[i].num,x[i].name[0]);}的运行结果为4E5S

A. 对
B. 错

定义以下结构体数组struct{int num;char name[10];}x[3]={1,"china",2,"USA",3,"England"};语句printf("\n%d,%s",x[1].num,x[2].name)的输出结果为2,USA

A. 对
B. 错

答案查题题库