23.int z=5; 24. 25. public void stuff1(int x) { 26. assert (x 0); 27. switch(x) { 28. case 2: x= 3; 29. default: assert false; } } 30. 31. private void stuff2(int y) { assert (y 0); } 32. 33. private void stuff3() { assert (stuff4O); } 34. 35. private boolean stuff4() { z = 6; return false; } Which is true?() A、 All of the assert statements are used appropriately.B、 Only the assert statement on line 31 is used appropriately.C、 The assert statements on lines 29 and 31 are used appropriately.D、 The assert statements on lines 26 and 29 are used appropriately.E、 The assert statements on lines 29 and 33 are used appropriately.F、 The assert statements on lines 29, 31, and 33 are used appropriately.G、 The assert statements on lines 26, 29, and 31 are used appropriately.
23.int z=5; 24. 25. public void stuff1(int x) { 26. assert (x> 0); 27. switch(x) { 28. case 2: x= 3; 29. default: assert false; } } 30. 31. private void stuff2(int y) { assert (y < 0); } 32. 33. private void stuff3() { assert (stuff4O); } 34. 35. private boolean stuff4() { z = 6; return false; } Which is true?()
- A、 All of the assert statements are used appropriately.
- B、 Only the assert statement on line 31 is used appropriately.
- C、 The assert statements on lines 29 and 31 are used appropriately.
- D、 The assert statements on lines 26 and 29 are used appropriately.
- E、 The assert statements on lines 29 and 33 are used appropriately.
- F、 The assert statements on lines 29, 31, and 33 are used appropriately.
- G、 The assert statements on lines 26, 29, and 31 are used appropriately.
相关考题:
下列程序段的执行结果是( )。x = 3 : y = 5 : z = 9x = x + yy = x - yIf x - y >z - x Then z = x + yIf x + y >z - y Then x = z + yPrint x, y, zA、 3 5 9B、 14 3 11C、 8 3 11D、 8 5 9
已知x=5,y=2,z=6。表达式x>y And z>x Or xy的值是()。A.FalseB.TrueC.1D.0 已知x=5,y=2,z=6。表达式x>y And z>x Or x<y And Not z>y的值是( )。A.FalseB.TrueC.1D.0
请选出以下程序的输出结果_______。includesub(x,y,z)int x,y,*z;{*z=y-x;}main(){int 请选出以下程序的输出结果_______。 #include<stdio.h> sub(x,y,z) int x,y,*z; {*z=y-x;} main(){ int a,b,c; sub(10,5,A) ;sub(7,a,B) ;sub(a,b,C) ; printf("%d,%d,%d\n",a,b,C) ; }A.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7
有以下程序:includemain(){int x=0,y=5,z=3; while(z-->0 ++x 有以下程序: #include <sldio.h> main() { int x=0,y=5,z=3; while(z-->0 ++x<5) y=y-1; printf("%d,%d,%d\n",x,y,z); } 程序执行后的输出结果是( )。A.3,2,0B.3,2,-1C.4,3,-1D.5,-2,-5
图示轮系中,已知各轮齿数为:z1=z2′=z3′=15,z2=25,z3=z4=30,z4′=2(左旋),z5=60,z5′=20(m=4mm)。若n1=500r/min,转向如图所示,求齿条6的线速度v的大小和方向。
过点(4,-1,3)且平行于直线L:(x-3)/2=y=(z-1)/5的直线方程为().A、(x-4)/2=(y+1)/0=(z-3)/5B、(x-4)/2=(y+1)/1=(z-3)/5C、(x+4)/2=(y-1)/0=(z+3)/5D、(x+4)/2=(y-1)/1=(z+3)/5
已知序列f(n)=δ(n)+3δ(n-1)+2δ(n-2),则L〔f(n-2)ε(n-2)〕为()A、1+3z-1+2z-2B、z-2+3z-3+2z-4+z-5C、z-2+3z-3D、z-2+3z-3+2z-4
单选题曲面z=x2+y2与平面2x+4y-z=0平行的切平面的方程是( )。A2x+4y-z-5=0B2x+4y-z=0C2x+4y-z-3=0D2x+4y-z+5=0