ISTQB
CTFL_UK · Question #185
A software component has the code shown below: Program BiggestA, Biggest: Integer Begin Read A Biggest = 10 While A > 0 Do If A > Biggest Then Biggest = A Endif Read A Enddo End The component has…
The correct answer is D. 10, 11, 0. See the full explanation below for the reasoning.
Question
A software component has the code shown below:
Program BiggestA, Biggest: Integer Begin Read A Biggest = 10 While A > 0 Do If A > Biggest Then Biggest = A Endif Read A Enddo End The component has exit criteria for component testing that include 100% statement coverage. Which of the following test cases will satisfy this criterion?
Options
- A0
- B10, 0
- C10, 5, 0
- D10, 11, 0
How the community answered
(44 responses)- A7% (3)
- B5% (2)
- C14% (6)
- D75% (33)
Community Discussion
No community discussion yet for this question.