QuestionQ43

VerifiedWhite-Box Test Techniques

Consider the pseudocode for the Answer program:

Question Image

Which statement BEST describes the control-flow anomalies present in the Answer program?

Explanation

The ELSE branch is unreachable because a is assigned 2 before b is assigned a + 10, so b is always 12 when the conditional is evaluated. The loop is infinite once entered because each iteration ends with a equal to 4, which always satisfies a < 5.

Community Discussion

No comments yet. Be the first to start the discussion!