Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

ISTQB Exam CTFL-Foundation Topic 1 Question 12 Discussion

Actual exam question for ISTQB's CTFL-Foundation exam
Question #: 12
Topic #: 1
[All CTFL-Foundation Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Dominga
5 days ago
I believe the answer is C) 3, as we need to test for 'female', 'male', and the default case.
upvoted 0 times
...
Leslie
7 days ago
I agree with Dannie, because we need to test both the 'female' and 'male' branches.
upvoted 0 times
...
Valene
7 days ago
The correct answer is B) 2 test cases. One for 'female' and one for 'male' to achieve 100% decision coverage.
upvoted 0 times
...
Dannie
9 days ago
I think we need 3 test cases to achieve 100% decision coverage.
upvoted 0 times
...

Save Cancel