下面结构体的定义语句中,错误的是( )。

admin2020-05-19  23

问题 下面结构体的定义语句中,错误的是(    )。

选项 A、struct ord{int x;int y;int Z;}struct ord a;
B、struct ord{int x;int y;int z;};struct ord a:
C、struct ord{int x;int y;int z;}a;
D、struct{int x;int y;int z;}a;

答案A

解析 分号代表该结构体定义语句的结束,选项A的结构体没有定义完全就用该结构体另外定义变量,用法有误,所以答案选A。
转载请注明原文地址:https://kaotiyun.com/show/BgCp777K
0

相关试题推荐
最新回复(0)