下面结构体的定义语句中 错误的是()。
已帮助 人
下面结构体的定义语句中,错误的是()。
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;

回答
共1条回复-
B 定义结构体变量有三种方式:①先声明结构体类型,再定义变量名,如选项A)所示;②在声明类型的同时定义变量,如选项C)所示;③直接定义结构体类型变量,如选项D)所示。
