对于for($i=100;$i<=200;$i+=3),循环结束后,变量$i的值是()。
第1题:
下列程序执行后的输出结果是______。
A.hello
B.hel
C.hlo
D.hlm void func1 (int i); void func2 (int i); char st[]="hello,friend!"; void func1(int i) { printf("%c",st[i]); if(i<3){ i+=2;func2(i); } } void func2 (int i) { printf("%c",st[i]); if(i<3){ i+=2;func1(i); } } main() { int i=0;func1(i);printf("\n");}
第2题:
下列程序执行后的输出结果是( )。 void func1 (int i); void func2(int i); char st[]="hello,friend!"; void func1 (int i) { printf("%c",st[i]); if(i<3){i+=2;func2(i);} } void func2(int i) { printf("%c",st[i]); if(i<3){i+=2;func1(i);}
A.hello
B.hel
C.hol
D.hlm
第3题:
下列程序 void func1(int i); void func2(int i) char st[]="hello,friend!"; void funcl(int i) { printf("%c",st[i]); if(i<3){i+=2;func2(i);} } void func2(int i) { printf("%c",st[i]); if(i<3){i+=2;funcl(i);} } main() { int i=0;funcl(i);printf("\n");} 执行后的输出结果是( )
A.hello
B.hel
C.hlo
D.hlrn
第4题:
以下循环体的执行次数是
main( )
{int i,j;
for(i=0,j=1;i<=j+1;i+=2,j- -)cout<<i<<endl;
}
A.3
B.2
C.1
D.0
第5题:
此题为判断题(对,错)。
第6题:
若变量已正确定义,要求程序段完成5!的计算,不能完成此操作的程序段是 ______。
A.for (i=1,p=1; i<=5; i+ +)p* = i;
B.for (i=1;i<=5; i+ +) {p=1;p*=i;}
C.i=1;p= 1;while( i<=5) { p* =i;i+ +; }
D.i=1;p=1;do{ p*=i;i+ +; } while (i<=5);
第7题:
用scala求10以内的偶数下面那些写法正确()
第8题:
由i=-1;while(i<10)i+=2;i++;可知,此while循环的循环体执行次数为6次。
第9题:
下列程序执行后的输出结果是() voidfunc1(inti); voidfunc2(inti); charst[]="hello,friend!"; voidfunc1(inti) {printf("%c",st[i]); if(i<3){i+=2;func2(i);} } voidfunc2(inti) {printf("%c",st[i]); if(i<3){i+=2;func1(i);} } main() {inti=0;func1(i);printf("/n");}
第10题:
10
121
11
100
第11题:
循环执行5次
循环执行100次
循环输出4个welcome
break的作用是结束本次循环,继续下一次循环
第12题:
v+>v->0,i+=i-=0
v+=v-=0,i+=i->0
v+=v-,i+=i-=0
v+=v->0,i+=i->0
第13题:
下列程序执行后的输出结果是 void funcl(int i); void func2(int i); char st[]="hello,friend!"; void funcl(int i) {printf("%c",st[i]); if(i<3){i+=2;func2(i);}} void func2(int i) { printf("%c",st[i]); if(i<3){i+=2;func1(i);}} main() {int i=
A.hello
B.hel
C.hlo
D.hlm
第14题:
以下循环体的执行次数是( )。 voidmain( ) {inti,j; for(i=0,j=1;i<=j+1;i+=2,j--)cout<<i<<endl; }
A.3
B.2
C.1
D.0
第15题:
以下循环体的执行次数是( )。 main() {int i,j; for(i=0,j=1;i<=j+1;i+=2,j--)cout<<i<<endl; }
A.3
B.2
C.
D.0
第16题:
有如下程序 For i=1 To 3 For j=5 To 1 Step -1 Print i+ j Next j, I其循环执行的次数为:______。
A.12
B.13
C.14
D.15
第17题:
以下循环体的执行次数是______。 main() { int i,j; for(i=0, j=1;i<=j+1; i+=2,j--) printf("%d\n",i) }
A.3
B.2
C.1
D.0
第18题:
inti;for(i=1;i<=100;i++){if(i==5)break;printf("welcome/t");}关于本程序段说法正确的是()
第19题:
设有定义int i=6,则执行以下语句后,i的值为()。 i+=i-1;
第20题:
二重循环for(i=0;i<5;i+=2)for(j=0;j<5;j++)的循环体的执行次数为15。
第21题:
int i=1,total=1;
while(i<5)
{
total+=i;
i+=1;
}
int i=1,total=0;
while(i <=5)
{
total+=i;
i+=1;
}
int i=0,total=0;
while(i <5)
{
i+=1;
total+=i;
}
int i=0,total=0;
while(i <=5)
{
total+=i;
i+=1;
}
第22题:
201
202
199
198
第23题:
int i=10;do{i=i+1;}while(i<0);
int i=int i=5;do{i+=1;}while(i>0);
int i=1;do{i+=2;}while(i!=10);
int i=6;do{i-=2;}while(i!=1);