nerdexam
ISTQB

CTFL_001 · 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

(34 responses)
  • A
    9% (3)
  • B
    3% (1)
  • C
    6% (2)
  • D
    82% (28)

Community Discussion

No community discussion yet for this question.

Full CTFL_001 Practice