A-A+
下面结构体的定义语句中 错误的是()。A.struct ord{int x;int Y;in
问题详情
下面结构体的定义语句中,错误的是()。
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;请帮忙给出正确答案和分析,谢谢!
参考答案
正确答案:A
A选项stnletonl{intx;inty;int2;struetoraa;错误,不能在定义结构体的同时,又用结构体类型名定义变量。应该写成B选项或者D选项的格式。