下面结构体的定义语句中,错误的是( )。
下面结构体的定义语句中,错误的是( )。
A.struct ord{int x;int Y;int z;}struct ord a;
B.struct ord{int x;im Y;im z;};struct ord a;
C.struct ord{int x;int Y;int Z;}a;
D.struct{int x;int Y;int z;}a;
正确答案:AA选项stnletonl{intx;inty;int2;struetoraa;错误,不能在定义结构体的同时,又用结构体类型名定义变量。应该写成B选项或者D选项的格式。
词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。
