题目内容

已知有定义struct sk{int x;float y;}a,b[5];错误的引用是()。

A. a.y
B. a->y
C. b[3].y
D. b->y

查看答案
更多问题

定义结构体类型 stud,下列选项中正确的声明语句是()。

A. struct{……} stud a;
B. stud a;
C. struct stud {……} a;
D. struct a;

下列选项中,不属于用户定义类型的选项是()。

A. long int
B. struct
C. union
D. enum

已定义结构体类型 “struct stud {int a; float b;} ;”,声明变量 s,并为 s 赋初值,正确的选项是()。

A. struct stud s=(4012,1.23);
B. struct stud s={4012,1.23};
C. stud s=(4012,1.23);
D. stud s={4012,1.23};

已定义结构体类型“struct sk{int a; float b;} d[2];”,下列选项中为数组 d 元素的成员输入数值,正确的语句是()。

A. scanf(“%d,%f”,&d[0].a, &d[1].b);
B. scanf(“%d,%f”,d[0].a,d[1].b);
C. scanf(“%d,%f”,d[0] );
D. scanf(“%d,%f”,d );

答案查题题库