A: 8,6,4,1
B: 8,6,3,2
C: 8,8,4,1
D: 8,6,4,2
举一反三
- 下列程序执行后,baz的值应是( )。 int index=1; int fox[ ]=new int[3]; Int bar=fox[index]; int baz:bar+index; A: 0 B: 1 C: 2 D: 编译错误
- int index = 1; int [] foo = new int [3]; int bar = foo [index]; int baz = bar + index; What is the result?() A: Baz has the value of 0 B: Baz has the value of 1 C: Baz has the value of 2 D: An exception is thrown. E: The code will not compile.
- 下面程序段的运行结果为() int index=1; int[] foo=new int[3]; int bar=foo[index]; int baz= bar+index;
- 下列程序段的运行结果为( )int index = 1;int foo[] = new int[3];int bar = foo[index];int baz = bar + index; A: baz 的值为 0 B: baz 的值为 1 C: baz 的值为 2 D: 抛出一个异常
- int index = 1; int foo = new int ; int bar = foo [index]; int baz = bar + index; What is the result?() A: Baz has the value of 0 B: Baz has the value of 1 C: Baz has the value of 2 D: An exception is thrown. E: The code will not compile.
内容
- 0
关于以下初始化序列的执行结果的说法正确的是( )。 int index=1; int[] foo=new int[3]; int bar=foo[index]; int baz=bar+index; A: baz的值为0 B: baz的值为1 C: 编译通过,但产生异常 D: 编译不能通过
- 1
以下程序的运行结果是( )。 void fun(int a[][3], int n) { int j; for(j=0;j A: 1 2 3 B: 2 5 8 C: 3 6 9 D: 7 8 9
- 2
关于二维数组的创建,以下做法正确的是:(1)int a[][] =new int[4][5](2)int a[][] =new int[4][]; a[0]=new int[10]; a[1]=new int[20];(3)int a[][]; a=new int[3][]; a[0]=new int[3]; a[1]={1,2};a[2]={1,2,3}; A: (1)(2)(3) B: (1)(2) C: (1)(3) D: (1)
- 3
已知a=[1 2 3; 4 5 6; 7 8 9],执行命令:a([3,1],:)=a([1,3],:),a将变为( )。 A: [4 5 6;4 5 6;4 5 6] B: [7 8 9;4 5 6;1 2 3] C: [2 2 2;5 5 5;8 8 8] D: [3 2 1;6 5 4;9 8 7]
- 4
CRH380B型动车组牵引变流器设置在[ ]车、牵引变压器设置在[ ]车。 A: 1/3/6/8、3/6 B: 2/4/6/8、2/7 C: 1/3/6/8、2/7 D: 1/4/6/7、3/6