A.ten times
B.zero times
C.one to me times
D.more than ten times
第1题:
Giventhefollowingcode:1)publicvoidmodify(){2)inti,j,k;3)i=100;4)while(i>0){5)j=i*2;6)System.out.println("Thevalueofjis"+j);7)k=k+1;8)i--;9)}10)}Whichlinemightcauseanerrorduringcompilation?()
A.line4
B.line6
C.line7
D.line8
第2题:
有如下语句序列:
int x=-10;while(++x){}
运行时while循环体的执行次数为______。
第3题:
下列各C语言程序段中不会构成死循环的程序段是()
A.int x=5; while(x);--x;
B.int x=5; while(x=2);
C.int x; for(x=5;x<10;x++) x--;
D.int x=5; do {++x; }while(x>=100);
第4题:
下列程序段循环( )次。int x=-10;while(++x) {}
A.9
B.10
C.11
D.无限
第5题:
A.Line35willnotcompile.
B.Line36willnotcompile.
C.Line37willnotcompile.
D.Line38willnotcompile.