ExamGecko
Question list
Search
Search

Related questions











Question 126 - CTFL-2018 discussion

Report
Export

Which of the following test cases will ensure that the statement 'Print 'Hold'' is exercised? [K3]

Refer to the exhibit

A.
X=2, Y=2, Z=2
Answers
A.
X=2, Y=2, Z=2
B.
X=2, Y=3, Z=4
Answers
B.
X=2, Y=3, Z=4
C.
X=2, Y=4, Z=3
Answers
C.
X=2, Y=4, Z=3
D.
X=4, Y=3, Z=2
Answers
D.
X=4, Y=3, Z=2
Suggested answer: C

Explanation:

The question asks which of the test cases will ensure that the statement 'Print 'Hold'' is exercised. The statement 'Print 'Hold'' is executed when X > Y and Z < Y. Therefore, to exercise this statement, we need to choose a test case that satisfies these conditions. Among the options given in this question, only C satisfies these conditions. X = 42 > Y =43 and Z =42 < Y =43. Therefore, C is the correct answer.

asked 18/09/2024
tony Gentry
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first