以下程序的输出结果是()。enumColor{Red,Green=2,Blue}staticvoidMain(string[]args){Colorc=0;Colorc1=(Color)2;Console.WriteLine("{0},{1}",c,c1);Console.Read();}
第1题:
A、1
B、3
C、5
D、6
第2题:
A.1、2、3、4、5
B.0、1、5、2、3
C.0、1、5、6、7
D.3、4、5、6、7
第3题:
Aolor:=‘green‘;
Bwriteln(green);
Cwriteln(color);
Da:=color=red;
第4题:
以下程序的输出结果是 【 11 】。
#include <stdio.h>
main( )
{ char *ch[4]={"red',"green","blue"};
int i=0;
while( ch[i] )
{ putchar( ch[i][0]); i++;)
}
第5题:
以下选项中不能正确把cl定义成结构体变量的是
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; } cl;
D.struct { int red; int green; int blue; } cl;
第6题:
已知枚举类型声明语句为: enumCOLOR{WHITE,YELLOW,GREEN=5,RED,BLACK=10}; 则下列说法中错误的是
A.枚举常量YELLOW的值为1
B.枚举常量RED的值为6
C.枚举常量BLACK的值为10
D.枚举常量WHITE的值为1
第7题:
以下选项中不能正确把c1定义成结构体变量的是
A.typedef struct {int red: int green: int blue; } COLOR; COLOR c1;
B.struct color c1 {int red int green: int blue; };
C.struct color {int red , int green : int blue : )cl;
D.struct {int red; int green; int blue } c1 ;
第8题:
A、1
B、4
C、5
D、6
第9题:
以下选项中不能正确把c1定义成结构体变量的是
A.typedef struct { int red; int green;; int blue; }COLOR; COLOR cl;
B.struct color cl { int red; int green; int blue; };
C.struet color { int red; int green; int blue; }c1;
D.struct { int red; int green; int blue; }cl;
第10题:
有以下程序:
程序的输出结果是: