若有以下结构体定义,则是正确的引用或定义。 Struct example { int x; int y; }V1;

admin2009-01-15  25

问题 若有以下结构体定义,则是正确的引用或定义。    Struct example    {  int x;       int y;    }V1;

选项 A、example.x=10
B、example V2.x=10
C、structv2;v2x=10
D、struct examplev2={10};

答案8

解析 在定义结构体变量时,不能只用结构体名example或关键字struct进行定义,必需要用结构体类型名struct example定义,在引用结构体成员变量时,需要用结构体变量名进行引用,所以选D。
转载请注明原文地址:https://kaotiyun.com/show/02Xp777K
0

随机试题
最新回复(0)