网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
int i = 0; while (true) { if(i==4) { break; } ++i; } System.out.println(“i=”+i); What is the result?()
A
i = 0
B
i = 3
C
i = 4
D
i = 5
E
Compilation fails.
参考答案
参考解析
解析:
暂无解析
更多 “单选题int i = 0; while (true) { if(i==4) { break; } ++i; } System.out.println(“i=”+i); What is the result?()A i = 0B i = 3C i = 4D i = 5E Compilation fails.” 相关考题
考题
在下列选项中,没有构成死循环的是A.int i=100; while(1) { i=i%100+1; if(i100)break; }B.for(;;);C.int k=10000; do{k++;}while(k10000);D.)int s=36; while(s)--s;
考题
下列语句中不是死循环的是A.int i=10; while(1) { i-- ; if (i= =1)break; }B.for(int i=l ;i<10;i++) { i -- ; }C.int i=0; do{ i++; }while(i >= 0);D.int i=l ; for (;;)i = i+1;
考题
下列语句中不是死循环的是A.int i=10; while(1) { i--; if(i==1) break; }B.for(int i=1;i<10;i++) { i--; }C.int i=0; do{ i++; }while(i>=0) ;D.int i=1; for(;;) i=i+1;
考题
以下程序的输出结果是( )。 min() { int i=0,a=0; while(i<20) { for(;;) { if((i%10)==0)break; else i--; } i+=11;a+=i; } cout<<a<<endl; }A.21B.32C.33D.11
考题
在下列选项中,没有构成死循环的是A.int i=100;while(1){i=i0+1;if(i100)break;}B.for(;;);C.int k=10000;do{k++;}while(k10000);D.int s=36;while(s)--s;
考题
下面程序的输出结果是( )。main(){int i=0,a=0;while(i<20){ for(;;){ if((i%10)==0)break;else i--;}i+=11;a+=i;}printf("%d\n",A);}
考题
请阅读下面程序 public class ThreadTest{ public static void main(String args[])throws Ex- ception{ int i=0; Hello t=new Hello; ; while(true){ System.Out.println("Good Morning"+i++): if(i= =2t.isAlive){ System.out.println("Main waiting for Hel- lo!"); join;//等待t运行结束 } if(i= =5)break;} } } class Hello extends Thread{ int l; public void run{ while(true)( System.Out.println("Hell0"+i++); if(i= =5)break;)))A.t.sleepB.t.yieldC.t.interruptD.t.start
考题
inti=0;while(true){if(i==4){break;}++i;}System.out.println(i=”+i);Whatistheresult?()
A.i=0B.i=3C.i=4D.i=5E.Compilationfails.
考题
publicclasstest(publicstaticvoidmain(stringargs){int1=0;while(i){if(i==4){break;}++i;}})Whatisthevalueofiatline10?()
A.0B.3C.4D.5E.Thecodewillnotcompile.
考题
以下程序的输出结果是main( ){int i=0,a=0;while(i<20){for(;;){if((i%10)==0)break;else i - -;}i+=11;a+=i;}cout<<a<<endl;}A.21B.32C.33D.11
考题
已知C源程序如下: include include void reverse(char S[]){ int C,i,J; f
已知C源程序如下:include<stdio. h>include<string. h>void reverse(char S[]){int C,i,J;for(i=0,j=strlen(s)-1;i<j;i++,j++){c=s[i];s[i]=s[j];s[j]=c;}}void getHex(int number,char s[]){int I;i=0;while(number>0){if(number%16<10)s[i++]=number%16+'0';elseswitch(number%16){case 10:s[i++]='A';break;case 11:s[i++]='B';break;case 12:s[i++]='C';break;case 13:s[i++]='D';break;case 14:s[i++]='E';break;case 15:s[i++]='F';break;default:printf("Error");break;}number/=16;}s[i]:'\o';reverse(s);}int main(){unsigned int number;int i=0:char s[50];printf("%s","please input number;\n");scanf("%d",&number):getHex(number,s);i=0;while(s[i])printf("%c",s[i++]);return 0;}画出程序中所有函数的控制流程图。
考题
有以下程序include main(){ int.i=0,a=0;while(i
有以下程序 #include <stdio.h> main() { int.i=0,a=0; while(i<20) { for(;;) { if((i%10)==0) break; else i--; } i+=11; a+=i; } printf("%d\n",a) ; } 程序运行后的输出结果是( )A.21B.32C.33D.11
考题
下列各循环语句中,不是死循环的是( )。A.int i=100; while(1){ i=i%100+1; if(i==20) break; }B.int i,sum=0; for(i=1;;i++) sum=sum+1;C.int k=0; do{ ++k; }while(k=0);D.int s=3379; while(s++%2+3%2) s++;
考题
有以下程序:includemain(){int i=0,a=0;while(i
有以下程序: #include<stdio.h> main() {int i=0,a=0; while(i<20) {for(;;) {if((i%5)==0)break; else i--; } i+=13,a+=i; } pfintf("%d\n",A); } 程序的输出结果是( )。A.62B.63C.23D.36
考题
在下列选项中,没有构成死循环的是( )。A.int i=100; while(1) { i==i0+1; if(i>100) break; }B.for(;;);C.int k=10000; do{k++;}while(k>10000);D.int s=36; while (s) --s;
考题
在下列选项中,没有构成死循环的程序是( )。A.int i=100; while(1) { i=i%100+1; if(i>100)break; }B.for(;;);C.int k=1000; do{++k} while (k>=1000);D.int s=36; while(s);--s;
考题
若有以下程序main(){ int a[4][4]={{1,2,-3,-4},{0,-12,-13,14},{-21,23,0,-24},{-31,32,-33,0}}; int i,j,s=0; for(i=0;i4;i++) { for(j=0;j4;j++) { if(a[i][j]0) continue; if(a[i][j]==0) break; s +=a[i][j]; } } printf("%d\n",s);}程序执行后的输出结果是
考题
下列程序段中,不是死循环的是_______。A.int i=100;B.unsigned k=0; while(1) do { { i=i%100+1; ++k if(i>=100)break; } } while(k>=0);C.for(;;);D.int s=3379; while(s++%2+s%2)s++;
考题
下列语句中不是死循环的是( )。A.int i=10;B.for(int i=1;j10;i++) while(1) { { i--; i--; } if(i==1)break;C.int i-0;D.int i=1:
考题
下列语句中不是死循环的是A.int i=10;B.for(int i=1;i<10;i++) while(1) { { i--; i--; } if(i= =1)break; }C.int i=0;D.int i=1; do{ for(;;)1=i+1; i++; }while(i>=0);
考题
以下程序的输出结果是( )。includemain()int i=0,a=0;while(i
以下程序的输出结果是( )。#includemain()int i=0,a=0;while(ifor(;;)if((i%10)==0)break;else i--;i+=11;a+=I;printf("%d\n",a);A.21B.32C.33D.11
考题
下列语句段中不是死循环的是( )。A.int i=100 While (1) { i=i%100+1 if(i==20) break; }B.int i sum=O; for (i=l;;i++) sum=sum +l;C.int k=0; do { ++K }while(k=O);D.int s=3379; while (s+ +%2+3%2)s++;
考题
以下程序输出结果是 include main ( ){int i=0,a=0; while ( i
以下程序输出结果是 #include <stdio.h> main ( ) { int i=0,a=0; while ( i<2 0 ) { for(;;) { if ((i%10) ==0) break; else i--; } i+=11; a+=i; } print f ( "%d\n" , a); }A.21B.32C.33D.11
考题
以下程序的输出结果是includemain(){int i=0,a=0; while(i
以下程序的输出结果是 #include<stdi0.h> main() { int i=0,a=0; while(i<20) { for(;;) { if((i%10)==0)break; elsei--; } i+=11;a+=i; } printf(“%d\n”,A) ; }A.21B.32C.33D.11
考题
int i = 0; while (true) { if(i==4) { break; } ++i; } System.out.println(“i=”+i); What is the result?() A、 i = 0B、 i = 3C、 i = 4D、 i = 5E、 Compilation fails.
考题
public class test ( public static void main(string args) { int 1= 0; while (i) { if (i==4) { break; } ++i; } } ) What is the value of i at line 10?()A、 0B、 3C、 4D、 5E、 The code will not compile.
考题
单选题public class test ( public static void main(string args) { int 1= 0; while (i) { if (i==4) { break; } ++i; } } ) What is the value of i at line 10?()A
0B
3C
4D
5E
The code will not compile.
热门标签
最新试卷