题目
针对下面的程序段,对于(MaxNum,Type)的取值,至少需要______个测试用例才能够满足判定覆盖的要求。
Whjle(MaxNum-->0)
{
If(10==Type)x=y * 2;
Else if(100==Type)x=y+20;
}
A) 5
B) 4
C) 3
D) 2
第1题
● 针对以下 C 语言程序段,对于(MaxNum,Type)的取值,至少需要(62)个测试用例能够满足判定覆盖的要求。
while (MaxNum-- > 0 )
{
if (10 == Type )
x = y * 2;
else
if (100 == Type )
x = y + 10;
else
x = y - 20;
}
(62)A.5 B. 4 C. 3 D. 2
第2题
A.maxNum=x if x>y else y
B.maxNum=math.max(x,y)
C.if(x>y): maxNum=xelse: maxNum=y
D.if(y>=x): maxNum=ymaxNum=x
第3题
A.5
B.4
C.3
D.2
第4题
A.maxNum=x If x>y else y
B.maxNum=math.max(x,y)
C.if (x>y): maxNum=x else : maxNum=y
D.if (y>=x): maxNum=y maxNum=X
第5题
下面的哪些程序段可能导致错误? () Ⅰ: String s = "Gone with the wind"; String t = "good "; String k = s + t; Ⅱ: String s = "Gone with the wind"; String t; t = s[3] + "one"; Ⅲ: String s = "Gone with the wind"; String standard = s.toUpperCase(); Ⅳ: String s = "home directory"; String t = s-"directory":
A.Ⅱ、Ⅲ
B.Ⅱ、Ⅳ
C.Ⅰ、Ⅳ
D.Ⅲ、Ⅳ
第6题
● 针对程序段:IF(A||B||C )THEN W=W/X,对于(A,B,C)的取值,(57)测试用例能够满足MCDC(修正条件逻辑判定)的要求。
(57)
A.(F,T,T) (T,F,T) (T,F,F) (T,T,F)
B.(T,F,F) (T,T,F) (F,T,T) (F,F,F)
C.(T,F,F) (T,T,F) (F,T,T) (F,F,T)
D.(T,F,F) (F,T,F) (F,F,T) (F,F,F)
第7题
● 针对程序段:IF(A||B||C )THEN W=W/X,对于(A,B,C)的取值,(57)测试用例能够满足MCDC(修正条件逻辑判定)的要求。
(57)
A.(F,T,T) (T,F,T) (T,F,F) (T,T,F)
B.(T,F,F) (T,T,F) (F,T,T) (F,F,F)
C.(T,F,F) (T,T,F) (F,T,T) (F,F,T)
D.(T,F,F) (F,T,F) (F,F,T) (F,F,F)
第8题
下面的哪些程序段可能导致错误? () Ⅰ:String s="Gone with the wind"; String t="good"; String k=s+t; Ⅱ:String s="Gone with the wind"; String t; t=s[3]+"one"; Ⅲ:String s="Gone with the wind"; String standard=s.toUpperCase(); Ⅳ:String s="home directory"; String t=s-"directory";
A.Ⅱ、Ⅲ
B.Ⅱ、Ⅳ
C.Ⅰ、Ⅳ
D.Ⅲ、Ⅳ
第9题
A.(F,T,T)(T,F,T)(T,F,F)(T,T,F)
B.(T,F,F)(T,T,F)(F,T,T)(F,F,F)
C.(T,F,F)(T,T,F)(F,T,T)(F,F,T)
D.(T,F,F)(F,T,F)(F,F,T)(F,F,F)
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!