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

admin2021-04-28  20

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

选项 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/lJtp777K
0

最新回复(0)