以下选项中不能正确把c1定义成结构体变量的是

来源:百度知道 编辑:UC知道 时间:2024/06/24 12:58:24
A) typedef struct
{ int red;
int green;
int blue;
} COLOR;
COLOR cl;

B) struct color cl
{ int red;
int green;
int blue;
};

C) struct color
{ int red;
int green;
int blue;
} c l;

D) struct
{ int red;
int green;
int blue;
} c l ;

请给出解释 谢谢

b
b的错误很明显,不能给一个结构体取两个大名,倘若要用cl指代color,应该像c一样,在声明末尾添加一个名字,就相当于起个小名儿,呵呵。
不懂可以m我。

明显是b…基础语法…多看课本