网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
int x= 10; do { x--; } while(x< 10); How many times will line 37 be executed?()
- A、 ten times
- B、 zero times
- C、 one to me times
- D、 more than ten times
参考答案
更多 “ int x= 10; do { x--; } while(x 10); How many times will line 37 be executed?() A、 ten timesB、 zero timesC、 one to me timesD、 more than ten times” 相关考题
考题
若有以下函数首部int fun(double x[10], int *n)则下面针对此函数的函数声明语句中正确的是A)int fun(double x, int *n);B)int fun(double , int );C)int fun(double *x, int n);D)int fun(double *, int *);
考题
阅读下面程序: include void fun(int n) { int x(5); static int y(10); if(n>0) {
阅读下面程序:include<iostream.h>void fun(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<end1;}}void main(){int m(1);fun(m);}则该程序的输出结果是______。
考题
阅读下面程序: include void f(int n) { int x(5); static int y(10); if(n>0) { ++
阅读下面程序:include<iostream.h>void f(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<endl;}}void main(){int m(1);f(m),}则该程序的输出结果是【 】
考题
已经语句int m=10;则下列表示引用的表示中正确的是()。A.int x=m;B.int y=10;C.int x=m;B.int y=10;C.int z;D.float t=8m;
考题
以下程序的输出结果是 【10】 。fun (int x,int y,int z){ z =x*x+y*y;}main (){int a=31;fun (6,3,a)printf ("%d", a)}
考题
以下程序执行后的输出结果是( )。include usingnamespacestd;void try(int,int,int,in
以下程序执行后的输出结果是( )。 #include <iostream> using namespace std; void try(int,int,int,int); int main ( ) { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = X*X; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定
考题
有如下程序: include using namespace std; void f1(int x, int y){int z=
有如下程序:#include<iostream>using namespace std;void f1(int x, int y){int z=x; x=y; y=z;)void f2(int x, int y){int z=x; x=y; y=z;}intmain(){int x=10, y=26;f1(x, y);f2(x, y);cout<<y<<end1;return 0;}运行时的输出结果是( )。A) 10B) 16C) 26D) 36A.B.C.D.
考题
有以下程序: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
考题
用程序计算一个整数的各位数字之和,在下划线处应填写的语句是( )。SET TALK OFFINPUT "X=" TO XS=0DO WHILE X! =0S=S+MOD(X, 10)ENDDO?sSET TALK ONA.X=int(X/10)B.X=int(X%10)C.X=X-int(X/10)D.X=X-int(X%10)
考题
若有以下函数首部: int fun(double x[10],int *n) 则下面针对此函数的函数声明语句中正确的是( )。A.int fun(double x, int *n);B.int fun(double, int);C.int fun(double *x, int n);D.int fun(double*, int*);
考题
有如下类定义: class Test { private int x; public int y; public void setX (int m) {x=m;} public int getX( ) {return x;} }现用Test t=new Text();生成一个对象t,则如下语句中,错误的是( )。A.t.x=10;B.t.y=10;C.t. setX(10);D.int m=t.getX( );
考题
要随机产生一个两位数并赋值给y,下面语句正确的是( )。A.y=10+INT(90*RND)B.x=10+INT(89*RND)C.x=INT(10+90*RND)D.x=10+INT(49+91*RND)
考题
【程序说明】程序功能是计算一个整数的各位数字之和。【程序】SET TALK OFFINPUT“x=”TO xs=0DO WHILE x!=0s=s+ MOD(x,10)(1)(2)? SSET TALK ON(1)A.x=INT(x*10)B.x=INT(x/10)C.x=x-INT(x/10)D.x=x-INT(x*10)
考题
分析以下程序的执行结果【】。include class S{ int A[10]; public: int operato
分析以下程序的执行结果【 】。include <iostream. h>class S{int A[10];public:int operator () (int);};int S: :operator() (int x) {return A[x];}void main() {S a;int i,j;for (i=0; i<10; i++)a(i)=i*2;for (i=0; i<10; i++)cout<<a(i)<<" ";cout<<end1; }
考题
有以下程序: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
考题
分析下列程序,并写出运行结果【】。 include voidmain(){ int x[10]: int i=5,*ptr=x;
分析下列程序,并写出运行结果【 】。include<iostream.h>void main(){int x[10]:int i=5,*ptr=x;*(ptr+i)=10;cout<<x[i]<<end1;
考题
以下程序执行后的输出结果是include using namespace std;void try(int,int,int,int)
以下程序执行后的输出结果是 #include <iostream> using namespace std; void try(int,int,int,int); int main () { int x,y,z,r; x =1 ; y = 2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y,int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定
考题
有以下程序: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
考题
下面程序计算一个整数的各位数字之和。在下划线处应填写的语句是 SET TALK OFF INPUT"X=Y"TO x s=0 DO WHILEx!=0 s=s+MOD(x,10) _________ ENDDO ?S SET TALK ONA.x=int(x/10)B.x=int(x%10)C.x=x-int(x/10)D.x=x-int(x%10)
考题
用程序计算一个整数的各位数字之和,在下划线处应填写的语句是( )。 SET TALK OFF INPUT "X=" TO X S=0 DO WHILE X!=0 S=S+MOD(X,10) ______ ENDDO ?S SET TALK ONA.X=int(X/10)B.X=int(X%10)C.X=X-int(X/10)D.X=X-int(X%10)
考题
定义一个int类型的有10个无素的数组x,存储于程序存储器,正确的定义语句是:()A、int data x[10];B、int xdata x[10];C、int code x[10];D、int idata x[10];
考题
Which two code fragments are most likely to cause a StackOverflowError?()A、int []x = {1,2,3,4,5};for(int y = 0; y 6; y++) System.out.println(x[y]);B、static int[] x = {7,6,5,4};static { x[1] = 8;x[4] = 3; }C、for(int y = 10; y 10; y++)doStuff(y);D、void doOne(int x) { doTwo(x); }void doTwo(int y) { doThree(y); }void doThree(int z) { doTwo(z); }E、for(int x = 0; x 1000000000; x++) doStuff(x);F、void counter(int i) { counter(++i); }
考题
多选题Which two code fragments are most likely to cause a StackOverflowError?()Aint []x = {1,2,3,4,5};for(int y = 0; y 6; y++) System.out.println(x[y]);Bstatic int[] x = {7,6,5,4};static { x[1] = 8;x[4] = 3; }Cfor(int y = 10; y 10; y++)doStuff(y);Dvoid doOne(int x) { doTwo(x); }void doTwo(int y) { doThree(y); }void doThree(int z) { doTwo(z); }Efor(int x = 0; x 1000000000; x++) doStuff(x);Fvoid counter(int i) { counter(++i); }
热门标签
最新试卷