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

admin2019-04-24  28

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

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

答案A

解析 A选项错误,不能在定义结构体的同时,又用结构体类型名定义变量,应该写成B选项或者D选项的格式。
转载请注明原文地址:https://kaotiyun.com/show/thRp777K
0

最新回复(0)