【填空题】执行下面程序段,x的值为()。 int x = 0; while (x < 5) { x++; }

【填空题】执行下面程序段,x的值为()。 int x = 0; while (x < 5) { x++; }


参考答案和解析
A

相关考题:

有以下程序main(){ int i,j,x=0;for(i=0;i2;i++){ x++;for(j=0;j=3;j++){ if(j % 2) continue;x++;}x++;}printf("x= % d\n",x);}程序执行后的输出结果是A)x=4B)x=8C)x=6D)x=12

设int a=0,b=5,c=2;选择可执行x++的语句是() 。 A.if(a) x++;B. if(a=b) x++;C. if(a =D. if(!(b-c)) x++;

阅读下面代码int x=3;while (x<9)x+=2;x++:while语句成功执行的次数是______。

下列程序段执行以后,内存变量y的值是 ______。 x=34567 y=0 DO WHILE x>0 y=x%10+y*10 x=int(x/10) ENDDOA.3456B.34567C.7654D.76543

在VB程序中,以下程序段执行后,x的值为( )x=0Do While x 在VB程序中,以下程序段执行后,x的值为( )x=0Do While xx=(x+2)*(x+3)LoopA.0B.72C.50D.168

在VB程序中,以下程序段执行后,x的值为( )x=0Do While x 在VB程序中,以下程序段执行后,x的值为( )x=0Do While xx=x+1LoopA.2B.3C.4D.5

( 9 )阅读下列代码段int x=3;while (x9)x+=2;x++;while 语句成功执行的次数是 【 9 】 。

执行下面的程序段 int x=35; char z='A'; int B; B=((x15)(z<'a')); 后,B的值为_______。A.0B.1C.2D.3

有以下程序:include using namespace std;int main (){int x=15;while (x>10 int main () { int x=15; while (x>10x<50) { x++; if (x/3) { x++; break; } } cout<<x<<endl; return 0; } 执行后的输出结果是A.15B.16C.17D.18

下面程序的输出是________。 main() {int x=3,y=6,a=0; while(x++!=(y=|)) { a+=1; if(y<x)break; } printf("x=%d,y=%d,a=%d\n",x,y,A) ; }A.x=4,y=4,a=1B.x=5,y=5,a=1C.x=5,y=4,a=3D.x=5,y=4,a=1

执行下列程序段以后,内存变量y的值是( )。x=76543y=0DO WHILE x>0 y=x%10+y*10 x=int(x/10)ENDDOA.3456B.34567C.7654D.76543

下列语句序列执行后,k的值是______。 int x=10,y=30; do{ y-=x; X++; }while(x++<y--);A.0次B.1次C.2次D.3次

下面的程序输出结果是()。includeusing namespace std;void add(){static int x;x++;c 下面的程序输出结果是( )。 #include<iostream> using namespace std; void add() { static int x; x++; cout<<x<<''; } int main() { for(int i=0;i<3;i++) add(); return 0; }A.111B.123C.222D.333

执行下面的程序段 int x=40; char z='B'; int B; B=((x0xff)(z>'a')); 后,B的值为( )A.0B.1C.2D.3

下列程序段执行以后,内存变量y的值是( )。 x=34567 y=0 DO WHILE x0 y=x%10+y*10 x=int(x/10) ENDDOA.3456B.34567C.7654D.76543

有以下程序:main(){int i, j, x=0; for(i=0; i<2; i++) { x++; for( j=0; j<=3; j++) { if(j%2) continue; x++; } x++; } printf("x=%d\n", x);}程序执行后输出结果是( )。A.x=4B.x=8C.x=6D.x=12

有以下程序:includeusing namespace std;int main(){ intx=15; while(x>10 有以下程序: #include <iostream> using namespace std; int main() { int x=15; while(x>10x<50) { x++; if(x/3) { x++; break; } } cout<<x<<end1; return 0; }A.15B.16C.17D.18

有以下程序:inelude main( ){int i,j,x=0;for(i=0;i 有以下程序:#inelude <stdio.h>main( ){ int i,j,x=0; for(i=0;i<2;i++ ) { x++; for(j=0;j<=3;j ++) { fi(j%2) continue; x++; x++; } pfinff( "x = % d\n",x);} 程序执行后的输出结果是( )。A.x=4B.x=8C.x=6D.x=12

有以下程序:includeusing namespace std;int main(){int x=15;while(x>10x 有以下程序: #include<iostream> using namespace std; int main() { int x=15; while(x>10x<50) { x++; if(x/3) { x++;break; } } cout<<x<<endl; return 0; } 执行后的输出结果是( )。A.15B.16C.17D.18

下述程序段的执行结果是()。includeVoid main(){int x; for(x=1;x 下述程序段的执行结果是( )。 #include <stdio.h> Void main() { int x; for(x=1;x<=100;x++) if(++x%3==0) if(++x%4==0) if(++x%7==0) printf("%d",x); }A.75B.76C.77D.84

有以下程序: include using namespace std; int main( ) { int x=15; while(x>10int main( ){int x=15;while(x>10x<50){x + +;if(x/3){x++; break;}}cout<<x<<endl;return 0;}执行后的输出结果是A.15B.16C.17D.18

有以下程序:inclydeusing namespace std;int main() { int x=15; while(x>10x<50) { x++; if(x/3) { x++;break; } } cout<<x<<endl; return 0; } 执行后的输出结果是A.15B.16C.17D.18

有以下程序:include using namespace std;int main() {int x=15;while(x>10 int main() { int x=15; while(x>10x<50) { x++; if(x/3) { x++; break; } } cout<<x<<end1; return 0; } 执行后的输出结果是A.15B.16C.17D.18

下面程序的输出结果是()。includevoid main(){int x=-1,y=5,z;z=(x++ 下面程序的输出结果是( )。#include<iostream.h>void main(){int x=-1,y=5,z;z=(x++<0) (y-->=0);cout<<x<<'\t'<<y<<'\t'<<z<<end1;}A.-1 5 0B.-1 4 1C.0 4 1D.0 4 0

设有int a=0,b=5,c=2,x=0;,下面可以执行到x++的语句是()A、if(a)x++;B、if(a=b)x++;C、if(a=b)x++;D、if(!(b-c))x++;

阅读下列代码段int x=3;while (x9) x+=2;x++;while语句成功执行的次数是()。A、1B、2C、3D、4

单选题设有int a=0,b=5,c=2,x=0;,下面可以执行到x++的语句是()Aif(a)x++;Bif(a=b)x++;Cif(a=b)x++;Dif(!(b-c))x++;

单选题阅读下列代码段int x=3;while (x9) x+=2;x++;while语句成功执行的次数是()。A1B2C3D4