exam questions

Exam CTFL All Questions

View all questions & answers for the CTFL exam

Exam CTFL topic 1 question 11 discussion

Actual exam question from iSQI's CTFL
Question #: 11
Topic #: 1
[All CTFL Questions]

Consider the following pseudo code:
1. Begin
2. Input X, Y
3. If X > Y
4. __Print (X, is greater than, Y)
5. Else
6. __Print (Y, is greater than or equal to, X)
7. EndIf
8. End
What is the minimum number of test cases required to guarantee both 100% statement coverage and 100% decision coverage?

  • A. Statement coverage = 3, Decision coverage = 3
  • B. Statement coverage = 2, Decision coverage = 2
  • C. Statement coverage = 1, Decision coverage = 2
  • D. Statement coverage = 2, Decision coverage = 1
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
laraerf
1 year, 7 months ago
C is correct
upvoted 1 times
...
Mthetho
1 year, 11 months ago
D. Statement coverage = 2, Decision coverage = 1
upvoted 1 times
...
69pawan6969
2 years, 2 months ago
Selected Answer: C
I believe C is more appropriate
upvoted 2 times
...
Prasanth25
3 years, 1 month ago
Should we treat reading 2 variables are 2 statements?
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago