GATE 2006
191 questions
MCQ 1911-mark 191
Questions 191–191 of 191
The cyclomatic complexity of the flow graph of a program provides
Answer: (C)
Cyclomatic complexity ( edges, nodes of the flow graph) equals the number of linearly independent paths in a basis set.
Running one test for each independent path in the basis set executes every statement at least once. So tests are enough, but fewer may also do, because one path can cover many statements. This makes an upper bound on the tests needed, not a lower bound.
The goal of such testing is that each statement is executed at least once, not "at most once", so the options with "at most once" are wrong.
Answer: (C)
Running one test for each independent path in the basis set executes every statement at least once. So tests are enough, but fewer may also do, because one path can cover many statements. This makes an upper bound on the tests needed, not a lower bound.
The goal of such testing is that each statement is executed at least once, not "at most once", so the options with "at most once" are wrong.
Answer: (C)