问题
单项选择题
下面结构体的定义语句中,错误的是
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;
答案
参考答案:B
解析: 对于选项B,结构体类型声明和定义分开时,在声明后应有分号“;”。