nerdexam
ISTQB

CTFL18 · Question #277

Consider the following pseudo code 1. Begin 2. Read Gender 3. __Print "Dear" 4. If Gender = `female' 5. Print ("Ms") 6. Else 7. __Print ( "Mr") 8. Endif 9. End How many test cases are needed to…

The correct answer is B. 2. See the full explanation below for the reasoning.

Question

Consider the following pseudo code 1. Begin 2. Read Gender 3. __Print "Dear" 4. If Gender = `female' 5. Print ("Ms") 6. Else 7. __Print ( "Mr") 8. Endif 9. End How many test cases are needed to achieve 100 per cent decision coverage?

Options

  • A1
  • B2
  • C3
  • D4

How the community answered

(30 responses)
  • A
    7% (2)
  • B
    80% (24)
  • C
    3% (1)
  • D
    10% (3)

Community Discussion

No community discussion yet for this question.

Full CTFL18 Practice