以下程序的运行结果是( )。#include int main(void){ union{ long a; int b; char c; } m;printf("%d\n", sizeof(m) );}
查看答案
若已经定义“typedef struct stu{ int a, b; } student;”,则下列叙述中正确的是( )。
A. stu是结构体变量
B. student是结构体变量
C. student是结构体类型名
D. a和b是结构体型变量
若有结构类型定义“typedef struct test{ int x, y[2];} TEST;”,则以下声明中正确的是( )。
A. struct test x;
B. struct x;
C. test x;
D. struct TEST x;
以下程序用来输出结构体变量stu所占存储单元的字节数。structstudent{intnum;charname[20];floatscore;}stu;intmain(void){printf("stusize:%d\n",sizeof());}
若有以下定义:structperson{charname[9];intage;};structpersonc[10]={{"John",17},{"Paul",19},{"Mary",18},{"Adam",16}};则语句“printf("%s",c[3].name);”的输出是。