若有以下结构体定义 则()是正确的引用或定义。 struct example { int x; int y; }v1;
已帮助 人
若有以下结构体定义,则()是正确的引用或定义。 struct example { int x; int y; }v1;
A.example.x=10
B.example v2.x=10
C.struct v2;v2.x=lO
D.struct example v2={10};

回答
共1条回复-
D 解析:在定义结构体变量时,不能只用结构体名example或关键字struct进行定义,必需要用结构体类型名structexample定义,在引用结构体成员变量时,需要用结构体变量名进行引用,所以选D。
