单选题
下面结构体的定义语句中,错误的是( )。
A、
struct ord{int x;int y;int z;}struct ord a;
B、
struct ord{int x;int y;intz;};struct ord a;
C、
struct ord{int x;int y;int z;}a;
D、
struct{im x;int y;int z;}a;
【正确答案】
A
【答案解析】
解析:A选项stmct ord{int x;int y;int z;}struct ord a;错误,不能在定义结构体的同时,又用结构体类型名定义变量。应该写成B选项或者D选项的格式。
提交答案
关闭