I'm interested and studying statement and decision coverage.
What type of problem will be found with 100% decision coverage that would be missed by 100% statement coverage?
A. A problem that occurs within a loop
B. A problem that occurs in an IF with an ELSE
C. A problem that occurs in an IF without an ELSE
D. A problem that occurs outside a loop
I got this sample question and I selected the correct answer as B.
Because 100% statement coverage ensures that every individual statement in the code has been executed at least once. However, it doesn't guarantee that all decision branches and all possible true and false outcomes of conditions have been tested.
But my friend said that the correct answer should be C.
Can anyone explain the correct answer?