A.0
B.1
C.2
D.3
第1题
#include
main()
{ int x=1,y=0;
if(!x) y++;
else if(x==0)
if (x) y+=2;
else y+=3;
printf("%d\n",y);
}
程序运行后的输出结果是
A.3
B.2
C.1
D.0
第2题
A、3
B、2
C、1
D、0
第3题
#include <stdio.h>
main()
{ int x=1,y=0;
if(!x) y++;
else if(x==0)
if (x) y+=2;
else y+=3;
printf("%d\n",y);
}
程序运行后的输出结果是
A)3
B)2
C)1
D)0
第4题
#inclUde<stdio.h>
main()
{int x=1。y=0;
if(!x)y++;
else if(x==0)
if(x)y+=2;
else y+=3; .
printf(“%d\n”,y);
}
程序运行后的输出结果是
A.3
B.2
C.1
D.0
第5题
#inclUde<stdio.h>
main()
{int x=1。y=0;
if(!x)y++;
else if(x==0)
if(x)y+=2;
else y+=3; .
printf(“%d\n”,y);
}
程序运行后的输出结果是
A.3
B.2
C.1
D.0
第7题
main()
{int x=2,y=-1,z=2;
if(x<y)
if(y<0)z=0;
else z+=1:
printf("%d\n",z);
}
A.3 B.2 C.1 D.0
第8题
int foo( int x, int y, int d)
{
if( x != 0 ) {
if ( y == 0 ) d = d / x;
else d = d / (x * y );
} else {
if( y == 0 ) d = 0;
else d = d / y;
}
return d ;
}
当用路径覆盖法进行测试时,至少需要设计 (31) 个测试用例。
(31)A. 3 B. 4 C. 5 D. 8
第9题
int foo( int x, int y, int d)
{
if( x != 0 ) {
if ( y == 0 ) d = d / x;
else d = d / (x * y );
} else {
if( y == 0 ) d = 0;
else d = d / y;
}
return d ;
}
当用路径覆盖法进行测试时,至少需要设计 (31) 个测试用例。
(31)A. 3 B. 4 C. 5 D. 8
第10题
A. 3
B. 2
C. 1
D. 0
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!