设有如下说明: typedef struct {int n; char c; double x;) STD; 则以下选项中,能正确定义结构体数组并赋初值的语句是( )。
A.STD tt[2]={{1,'A',62},{2,'B',75}};
B.STD tt[2]={1,"A",62},2,"B",75};
C.stmc tt[2]={{1,'A'),{2,'B'}};
D.struc tt[2]={{1,"A",62.5),{2,"B",75.0}};
第1题:
设有如下说明typedef struct{ int n; char c; double x;}STD;则以下选项中,能正确定义结构体数组并赋初值的语句是A.STD tt[2]={{1,’A’,62},{2,’B’,75}}; B.STD tt[2]={1,"A",62,2,"B",75};C.struct tt[2]={{1,’A’},{2,’B’}}; D.struct tt[2]={{1,"A",62.5},{2,"B",75.0}};
第2题:
设有如下说明: typedef struct { int n; char c;double x;}STD; 则以下选项:能正确定义结构体数组并赋初值的语句是( )。
A.STDtt[2]={{1,'A',62},{2,'B',75}};
B.STDtt[2]={1,"A",62,2,"B",75};
C.struet tt[2]={ {1,'A'},{2,'B'}};
D.struct tt[2]={{1,"A",62.5},{2,"B",75.0}};
第3题:
以下结构体类型说明和变量定义中正确的是()。
A.typedef struct {int n; char c;} REC; REC x,y;
B.struct REC; {int n; char c;}; REC x,y;
C.typedef struct REC ; {int n=0; char c=’A’; } x,y;
D.struct {int n; char c; } REC x,y;
第4题:
设有如下说明 typedef struct {int n;char c;double x;}STD; 则有以下选项,能正确定义结构体数组并赋初值的语句是
A.STD tt[2]={{1,'A',62},{2,'B',75}};
B.STD tt[2]=“1,"A",62,2,"B",75};
C.struc tt[2]={{1,'A'},{2,'B'}};
D.struct tt[2]=<<1,"A",62.5},{2,"B",75.0}};
第5题:
设有如下说明 typedef struct {int n;char c;double x;}STD; 则以下选项中,能正确定义结构体数组并赋初值的语句是
A.STD tt[2]={{l,'A',62},{2,'B',75}};
B.STD tt[2]={1,"A",62,2,"B",75};
C.streetn[2]={{1,'A'},{2,'B'}};
D.struct tt[2]={{1,"A",62.5},{2,"B",75.0}};