若有: typedef struct S { int g; char h; } T; 下列说法正确的是( )。
A. 可用 S 声明结构变量
B. 可用 T 声明结构变量
C. S 是结构变量
D. T 是结构变量
查看答案
下列有关结构的定义,错误的是( )。
A. typedef struct date{ int year,month, day;} type_date;
B. struct{char name[10];float angle;};
C. typedef date{ int year,month, day;} type_date;
D. struct date{ int year,month, day;} type_date;
若有: typedef struct date{ int year,month, day;} type_date;下列说法正确的是( )。
A. 定义了结构变量 type_date
B. 这个定义是错误的
C. 定义了结构类型 type_date
D. 定义了结构 type_date
若有: struct st1{ int a, b;float x, y;} s1, s2;struct st2{ int a, b;float x, y;} s3, s4;下列说法正确的是( )。
A. 结构变量不可以整体赋值
B. 结构变量 s1、s2、s3、s4 之间均不可以相互赋值
C. 结构变量 s1、s2、s3、s4 之间可以相互赋值
D. 只有结构变量 s1 和 s2、结构变量 s3 和 s4 之间可以相互赋值
若有:struct Person{ char name[20] ;int age ;char sex ;} a = {"Li ning", 20, 'M'};则输出结构变量 a 的 age 成员的语句为( )。
A. printf("%d", age);
B. printf("%d", Person.age);
C. printf("%d", a.age);
D. printf("%d", Person.a.age);