A: struct{ int red; int green; int blue;} cor;
B: struct color cor{ int red; int green; int blue;};
C: struct color{ int red; int green; int blue;} cor;
D: typedef struct{ int red;int green;int blue;}COLOR;COLOR cor;
举一反三
- 以下选项中不能正确把 cl 定义成结构体变量的是 ______ 。 1 . typedefstruct {intred; int green; int blue; } COLOR; COLOR cl; 2 . structcolor cl { int red; int green; int blue; }; 3 . structcolor { int red; int green; int blue; }cl; 4 . struct {int red; int green; intblue; }c1;
- 阅读下面的程序, 请写出程序的输出结果 。 #include<iostream> using namespace std; int main () { enum Color {Red,Green,Blue}; Color color; color=Red; cout<<color<<","; color=Green; cout<<color<<","; color=Blue; cout<<color<<","; cout<<Red+Green+Blue<<endl; return 0; }
- 下面对枚举变量的定义中,正确的是( )。 A: enum color {red, blue, grenn} a, b; B: enum color={red, blue, green} a,b; C: enum color={"red", "blue", "green"} a, b; D: enum color {red, blue, green} a, b;
- 大千世界,五彩缤纷,颜色何止千万。除了Color类自带的已知颜色,还可以构造其他任何特殊的颜色。最常用的构造方式如下:Color c = Color.FromArgb(int alpha, int red, int green, int blue);其中,四个参数alpha、red、green和blue分别表示颜色透明度、红色分量、绿色分量和蓝色分量。它们的取值范围是_________。 A: 0 ~ 127 B: 0 ~ 255 C: 0 ~ 65535 D: 0 ~ 2147483647
- 以下结构体定义错误的是 A: struct ord {int x; int y} struct ord a; B: struct ord {int x; int y} ; struct ord a; C: struct ord {int x; int y} a; D: struct {int x; int y} a;
内容
- 0
以下结构体的定义语句中,错误的是_____ 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
下面结构体的定义语句中,正确的是( ) A: struct { int x; int y; int z;}ord;struct ord a; B: struct { int x; int y; int z;}ord;ord a; C: struct ord{ int x; int y; int z;};struct ord a; D: struct { int x, int y, int z;}a;
- 2
下面span标签中HelloWorld字体的颜色是:()span{color:green;}.red{color:red;}#blue{color:blue;}HelloWorld A: green B: red C: blue D: black
- 3
下面是关于结构类型与变量的定义语句,错误的是________。 A: struct test{int a; int b; int c;}; struct test y; B: struct test{ int a; int b; int c;} struct test y; C: struct test{ int a; int b; int c;} y; D: struct { int a; int b; int c;} y;
- 4
下列对结构体类型变量定义不正确的是( ) A: struct teacher { int num; int age; }teach1; B: struct { int num; int age; }teach1,teach2; C: struct { int num; int age; }teacher; struct teacher teach1; D: struct teacher { int num; int age; }; struct teacher teach1;