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

admin2020-06-16  34

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

选项 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)选项struct  ord  {int  x;int  y;int  z;} struct  ord  a;错误,不能在定义结构体的同时,又用结构体类型名定义变量。应该写成B)选项或者D)选项的格式。
转载请注明原文地址:https://jikaoti.com/ti/NFG0FFFM
0

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