Directions (Q91–95): A flow graph F with entry node 1 and exit node 11 is shown (figure with Q91). Its nodes are 1, (2,3), (4,5), 6, 7, 8, 9, 10 and 11, with edges 1→(2,3), (2,3)→6, (2,3)→(4,5), 6→7, 6→8, 7→9, 8→9, 9→10, (4,5)→10, 10→1 and 1→11.
What is the cyclomatic complexity of flowgraph F?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. 4
Explanation
11 edges − 9 nodes + 2 = 4 (equally, 3 predicate nodes + 1).