以下选项中不能正确把c1定义成结构体变量的是
来源:百度知道 编辑:UC知道 时间:2024/09/20 02:43:11
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 ;
请给出解释 谢谢
{ 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…基础语法…多看课本
15、 若以下选项中的变量已正确定义,则正确的赋值语句是
设有定义:int a,*pa=&a;以下scanf语句中能正确为变量a读入数据的是:
c++中如何给类中的结构变量定义全局变量
java中静态函数中为什么不能定义static变量?
ASP中定义变量
20.设有定义:int a,*pa=&a;以下scanf语句中能正确为变量a读入数据的是 × 正确答案为A
结构体里是不是不能定义函数
c语言中,如何把字符串,如“abcdef”赋值个一个变量,怎么定义该变量??
asp 循环中定义变量
C语言定义结构体变量中有 Handle h_sour;这里面的Handle是什么意思啊,哪位好心人能给解答一下啊!