22 2 \表达式\的值为()。 A) true2006 B)true C)false D)0\C c 23 2 \已知
enum Course{ Math, English, Computer, History, Chemistry=0, Philology, Philosophy} Course cc
则下列语句错误的是()。
A) int a=(int) Course. English; B) cc=Course. English+2;
C) cc=5; D) bool b=Course. Math == Course.Chemistry;\C c
24 2 \下面代码的输出结果是()。 int x=5; int y=x++;
Console.WriteLine(y); y=++x;
Console.WriteLine(y);
A) 5 6 B)6 7 C)5 6 D)5 7\D d
25 2 \当month等于6时,下面代码的输出结果是()。 int days=0; switch(month)
{
case 2: days=28; break; case 4: case 6:
case 11: days=30; break;
default: days=31; break; }
Console.WriteLine(days);
A) 0 B) 28 C)30 D).31\ c
26 2 \在C#中,下列代码运行后,变量Max的值是()。
A) 0 B)5 C)10 D)15 int a = 5, b = 10, c = 15, max = 0; max = a > b ? A : b;
max = c < max ? C : max;\C c
27 2 \下面代码运行后,s的值是()。 int s=0;
for(int i=1;i<100;i++) {
if(s>10) { break;}
if(i%2==0) {s+=I;} }
A) 20 B) 12 C) 10 A b
28 2 \若打印如下图案,画线处应填入()。 for(int i=1; i<=5;i++) {
for(int j=_______; j<=5; j++) { Console.Write(“*”); } Console.WriteLine(); }
D)6\ ***** **** *** ** *
A)1 B) I C) i+1 D)0\B b
29 2 \下面代码实现数组array的冒泡排序,画线处应填入()。
A) 4-i B) i C) i+1 D)3-I
int[ ] array={30,56,38,42}; int temp;
for(int i=0; i<3; i++) {
for(int j=0;j<______; j++) {
if(array[j] { temp=array[j]; array[j]=array[j+1]; array[j+1]=temp; } } }\ d 30 2 \下面代码的输出结果是()。

