niusouti.com
更多“24. Albert can do ________things.A. One B. Two C.Three D. Four ”相关问题
  • 第1题:

    以下对枚举类型名的定义中正确的是( )

    A.enum a={one,two,three};

    B.enum a{one=9,two=-1,three=200};

    C.enum a={"one","two","four"};

    D.enum a{"nine","two","three"};


    正确答案:B

  • 第2题:

    以下对枚举类型名的定义中正确的是( )。

    A.enum a={one,two,three};

    B.enum a{one=9,two=-1.three=200};

    C.enum a={"one","two","four"};

    D.enum a{"nine","two","three"};


    正确答案:B
    解析:枚举类型的定义类似于结构体和共用体,所以选项A和C不正确。大括号中的枚举元素应该使用合法标识符来定义,而不是字符串常量,所以选项D不正确。故应该选择B。

  • 第3题:

    下列给字符串二维数组进行赋值的语句中,错误的是()。

    A.String s[ ] [ ] = new String [ ] [ ] { { “One “ , “ Two “ }, { “ Three “ , “ Four “ } } ;

    B.String s[ ] [ ] = { { “ One “ , “Two “},{ “ Three “ , “ Four “ } } ;

    C.String s[ ] [ ] = new String [ ] [ ] { { “Zero”} , { “ One ” , “Two” , “ Three” , “ Four” } } ;

    D.String s[ 2] [2 ] = { { “ One ” , “Two”},{“ Three” , “ Four” } } ;


    String s[ 2] [2 ] = { { “ One ” , “Two”},{“ Three” , “ Four” } } ;

  • 第4题:

    下列语句能给数组赋值,而不使用for循环的是

    A.myArray{[1]="One";[2]="Two";[3]="Three";}

    B.String s[5]=new String[] {"Zero","One","Two","Three","Four"};

    C.String s[]=new String[] {"Zero","One","Two","Three","Four"};

    D.String s[]=new String[]= {"Zero","One","Two","Three","Four"};


    正确答案:C
    解析:字符串数组赋初值的方法有两种,一种是如选项C一样初始化。另外一种是先为每个数组元素分配引用空间,再为每个数组元素分配空间并赋初值。例如还可做如下赋值:
      string s[]=new String[5];
      s[0]="Zero";
      s[1]="One";
      s[2]="Two";
      s[3]="Three";
      s[4]="Four";

  • 第5题:

    How many morphemes does the word "impossible" consist of?

    A.One.
    B.Two.
    C.Three.
    D.Four.

    答案:C
    解析:
    考查词素知识。impossible这个单词包含三个语素,分别是前缀im-,词根possi和后缀-ble。故选C。

  • 第6题:

    【填空题】运行下列程序,输出结果是____。 #include <iostream> using namespace std; enum opt{ONE,TWO,THREE,FOUR,FIVE,SIX,SEVEN}op; int main(void) { cout<<ONE; cout<<TWO; cout<<SIX; return 0; }


    B 解析:本题考查循环辅助控制语句break和continue,前者退出整个for循环,后者跳过本次循环没有执行完的若干条语句,开始下一次循环操作,建议读者采用本书推荐的列表法分析。