网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有一段程序如下,请设计测试用例以满足语句覆盖要求。 void DoWork (int x,int y,int z) { int k=0,j=0; if ( (x>3)&&(z5) ) { j=x*y+10; } //语句块2 j=j%3; //语句块3 }


参考答案

更多 “ 有一段程序如下,请设计测试用例以满足语句覆盖要求。 void DoWork (int x,int y,int z) { int k=0,j=0; if ( (x>3) } //语句块2 j=j%3; //语句块3 } ” 相关考题
考题 以下程序执行后的输出结果是( )。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.不确定

考题 下面程序段中的错误语句是 ______。 class M{ int i; public: void ~AA(int); AA *p; void AA(); void AA(int x){i=x;}; };A.AA *p;B.void ~AA(int);C.void AA(int);D.void AA(int x){i=x;};

考题 设函数findbig已定义为求3个数中的最大值。以下程序将利用函数指针调用findbig函数,请填空。main(){ int findbig(int,int,int); int (*f)(),x,y,z,big; f=; scanf("%d%d%d",x,y,z); big=(*f)(x,y,z); printf("big=%d\n",big);}

考题 以下程序执行后的输出结果是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.不确定

考题 以下程序执行后的输出结果是includeusing namcspace std;void try(int,int,int,int); 以下程序执行后的输出结果是 #include<iostream> using namcspace 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.不确定

考题 x,y是整数型变量,z产生一个范围在[y,x]之间的随机整数的语句是( )。A.z=Int(Rnd*(y-x+1))+xB.z=Int(Rnd*y) + xC.z=Int(Rnd*x)+yD.z=Int(Rnd*(y-x)) + x

考题 以下程序执行后的输出结果是()。includeusing namespace std;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<<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;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<<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.不确定

考题 x,y是整数型变量,在VBA中产生一个范围在[x,y]之间的随机整数z的语句为()。A.z=Int(Rnd*(y-x+1))+xB.z=Int(Rnd*(x-y+1))+yC.z=Int(Rnd*x)+yD.z=Int(Rnd*y)+x