网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
int i = 1,j = 10; do{ if (i>j) { continue; } j--; } while (++i <6); System.out.println(“i = “ +i+” and j = “+j); What is the result?()
A
i = 6 and j = 5
B
i = 5 and j = 5
C
i = 6 and j = 4
D
i = 5 and j = 6
E
i = 6 and j = 6
参考答案
参考解析
解析:
暂无解析
更多 “单选题int i = 1,j = 10; do{ if (ij) { continue; } j--; } while (++i 6); System.out.println(“i = “ +i+” and j = “+j); What is the result?()A i = 6 and j = 5B i = 5 and j = 5C i = 6 and j = 4D i = 5 and j = 6E i = 6 and j = 6” 相关考题
考题
给定下面的代码: int i=1,j=10; do { if(i++>--j) continue; }while(i<5) 执行完之后,i与j的值分别是多少? ( )A.i=6,j=5B.i=5,j=5C.i=6,j=4D.i=5,j=6
考题
有以下程序:main(){int x[]={1,3,5,7,2,4,6,0},i,j,k; for(i=0;i=i;j--)if (
有以下程序: main() { int x[]={1,3,5,7,2,4,6,0},i,j,k; for(i=0;i<3;i++) for (j=2;j>=i;j--) if (x[j+1)>x[j]){k=x[j];x[j];x[j+1);x[j+1]=k;} for (i=0;i<3;i++) for (j=4;j<7-i;j++) if (x[j]>x[j+1]){k=x [j];x[j]=x[j+1];x[j+1)=k;} for(i=0;i<8;i++)printf("%d",x[i]); printf("\n"); } 程序运行后的输出结果是 ______。A.75310246B.1234567C.76310462D.13570246
考题
在执行完此程序段后,i,j值为 int i=1,j=10; do{ if(++i>j--)continue; }while(i<5);A.i=6 and j=5B.i=5 and j=5C.i=6 and j=4D.i=5 and j=6
考题
执行下面的程序段后i和j的结果为 int i=1,j=10; do { if(i++>--j)continue; } while(i<5);A.i=6,j=5B.i=5,j=5C.i=6,j=4D.i=5,j=6
考题
inti=1,j=10;do{if(ij){continue;}j--;}while(++i6);System.out.println(i=+i+”andj=+j);Whatistheresult?()
A.i=6andj=5B.i=5andj=5C.i=6andj=4D.i=5andj=6E.i=6andj=6
考题
inti=1,j=10;do{if(ij){break;}j--;}while(++i5);System.out.println(i=”+i+”andj=+j);Whatistheresult?()
A.i=6andj=5B.i=5andj=5C.i=6andj=4D.i=5andj=6E.i=6andj=6
考题
有以下程序:main(){int x[]={1,3,5,7,2,4,6,0),i,j,k;for(i=0;i=i;j--)if( x[j
有以下程序: main() { int x[]={1,3,5,7,2,4,6,0),i,j,k; for(i=0;i<3;i++) for(j=2;i>=i;j--) if( x[j+1]>x[j]){ k=x[j];x[j]=x[j+1];x[j+1]=k; } for(i=0;i<3;i++) for(j=4;j<7-i;j++) if(x[j]>x[j+1]){ k=x[j];x[j]=x[j+1];x[j+1]=k; } for(i=0;i<8;i++) printf("%d",x[i]); printf("\n"); } 程序运行后的输出结果是( )。A.7.53102e+007B.01234567C.7.63105e+007D.1.35702e+007
考题
以下程序的输出结果为( )。 public class Main { public static void main(String[] args) { int i=0, j=0, a=6; if((++i>0)||(++j>0)) a++; System.out.println( "i=" +i+", j ="+j+", a="+A; } }A.i=0, j=0, a=6B.i=1, j=1, a=7C.i=1, j=0, a=7D.i=0, j=1, a=7
考题
在执行完此程序段后,i,j值为 int i=1-10; do{ if(++i>j--)continue; } while(i<5);A.i=6 and j=5B.i=5 and j=5C.i=6 and j=4D.i=5 and j=6
考题
以下选项中循环结构合法的是( )。A.while (int i<7) { i+ + System.out.println("i is" + i): }B.int j:3; while (j) { System.out.println("j is"+j); }C.int j=O; for (int k=0; j + k!=10; j + +, k+ +) { System.out.println("j is"+j +,"k is"+ k): }D.int i=0: do{ {System.out.println("j is"+ j+ +); if (j==3){continue loop;} }while(j<10);
考题
有以下程序: void fun(int *a,int i,int j) { int t; if(i<j) { t=a[i];a[i]=a[j];a[j]=t; i++; j--; fun(a,ij); } } main() { int x[]={2,6,1,8},i; fun(x,0,3); for(i=0;i<4;i++) printf("%2d",x[i]); printf("\"n); } 程序运行后的输出结果是( )。A.1 2 6 8B.8 6 2 1C.8 1 6 2D.8 6 1 2
考题
有以下程序:main(){int x[]={1,3,5,7,2,4,6,0},i,j,k;for(i=0;i=i;j--)if(x[j+
有以下程序: main() { int x[]={1,3,5,7,2,4,6,0},i,j,k; for(i=0;i<3;i++) for(j=2;j>=i;j--) if(x[j+1]>x[j]) { k=x[j]; x[j]=x[j+1]; x[j+1]=k; } for(i=0;i<3;i++) for(j=4;j<7-i;j++) if(x[j]>x[j+1]) { k=x[j]; x[j]=x[j+1]; x[j+1]=k; } for(i=0;i<8;i++) printf("%d",x[i]); printf("\n"); } 程序运行后的输出结果是( )。A.75310246B.1234567C.76310462D.13570246
考题
观察以下程序段:int i=1,j=10;do{if(i++>--j) continue;} while(i
A. i=6 j=5B. i=5 j=5C. i=6 j=4D. i=5 j=6
考题
main( ){ int a[6]={10,20,30,40,50,60},i;invert(a,0,5);for(i=0;i6;i++) printf(“%d,”,a[i]);printf(“\n”);}invert(int s[ ],int i,int j){ int t;if(iJ){ invert(s,i+1j-1);t=s[i];s[i]=s[j];s[j]=t;}}
考题
int i = 1,j = 10; do{ if (ij) { continue; } j--; } while (++i 6); System.out.println(“i = “ +i+” and j = “+j); What is the result?() A、 i = 6 and j = 5B、 i = 5 and j = 5C、 i = 6 and j = 4D、 i = 5 and j = 6E、 i = 6 and j = 6
考题
int i = 0, j = 5; tp; for (;;) { i++; for(;;) { if (i --j) { break tp; break tp; } } System.out.println(“i=” +i “,j =”+j); } What is the result?() A、 i = 1, j = 0B、 i = 1, j = 4C、 i = 3, j = 4D、 i = 3, j = 0E、 Compilation fails.
考题
public class Test { public static void main(String Args[]) { int i =1, j = 0; switch(i) { case 2: j +=6; case 4: j +=1; default: j +=2; case 0: j +=4; } System.out.println(“j =” +j); } } What is the result? () A、 0B、 2C、 4D、 6E、 9F、 13
考题
下列代码段inti=1,j=10;do{???if(i++--j)continue;}while(i5);执行完毕后,i和j的值分别是()。A、i=6?j=5B、i=5?j=5C、i=6?j=4D、i=5?j=6
考题
int i= 1, j= 10 ; do ( if (i++ --j) continue; ) while (i5); After execution, what are the values for I and j? ()A、 i = 6 and j= 5B、 i = 5 and j= 5C、 i = 6 and j= 4D、 i = 5 and j= 6E、 i = 6 and j= 6
考题
int i = 1,j = 10; do { if(ij) { break; } j--; } while (++i 5); System.out.println(“i =” +i+” and j = “+j); What is the result?()A、 i = 6 and j = 5B、 i = 5 and j = 5C、 i = 6 and j = 4D、 i = 5 and j = 6E、 i = 6 and j = 6
考题
单选题public class Test { public static void main(String Args[]) { int i =1, j = 0; switch(i) { case 2: j +=6; case 4: j +=1; default: j +=2; case 0: j +=4; } System.out.println(“j =” +j); } } What is the result? ()A
0B
2C
4D
6E
9F
13
考题
单选题int i = 1,j = 10; do { if(ij) { break; } j--; } while (++i 5); System.out.println(“i =” +i+” and j = “+j); What is the result?()A
i = 6 and j = 5B
i = 5 and j = 5C
i = 6 and j = 4D
i = 5 and j = 6E
i = 6 and j = 6
考题
单选题下列代码段inti=1,j=10;do{???if(i++--j)continue;}while(i5);执行完毕后,i和j的值分别是()。A
i=6?j=5B
i=5?j=5C
i=6?j=4D
i=5?j=6
考题
单选题int i= 1, j= 10 ; do ( if (i++ --j) continue; ) while (i5); After execution, what are the values for I and j? ()A
i = 6 and j= 5B
i = 5 and j= 5C
i = 6 and j= 4D
i = 5 and j= 6E
i = 6 and j= 6
热门标签
最新试卷