下列结构体类型说明和变量定义中,正确的是
A: struct SS{char flag;float x;} struct SS a,b;
B: struct {char flag;float;}SS; SS a,b;
C: struct ss{char flag;float x;}; struct ss a,b;
D: typedef{char flag;float x;}SS; SS a,b;
A: struct SS{char flag;float x;} struct SS a,b;
B: struct {char flag;float;}SS; SS a,b;
C: struct ss{char flag;float x;}; struct ss a,b;
D: typedef{char flag;float x;}SS; SS a,b;
举一反三
- 以下结构体类型说明及结构体变量a,b的定义中,正确的是:( )。 A: struct ss { char flag; float x; } ; ss a,b; B: struct ss{ char flag;float x;}; struct ss a,b; C: struct { char flag; float x; }ss; ss a,b; D: struct { char flag;float x;}ss;struct ss a,b;
- 设有如下定义:struct s1{int x;int y;};struct s2{int a;float b;struct s1 p;}ss;以下引用正确的是( )。 A: (ss).x B: (ss)->p.a C: ss.p->a D: ss.p.x
- 下列字符数组定义和赋值正确的是( ) A: char ss[]={'abcd'}; B: char ss[4]="abcdef"; C: char ss[5]={ "abcd"}; D: char ss[5]= 'abcd';
- 下列语句中存在语法错误的是______。 A: char ss[]={ "right? "}; B: char ss[ ][20]={ "right? "}; C: char *ss[6]; ss[1]= "right? "; D: char ss[6][20]; ss[1]= "right? ";
- 以下语句中存在语法错误的是 A)char ss[6][20]; ss[1]="right?"; B)char ss[][20]={"right?"}; C)char *ss[6]; ss[1]="right?"; D)char *ss[]={"right?"};