All mock tests are FREE till 31 December — register to save your progress
Unit 6 · Software Engineering Paper 2 CS · June 2024 (Cancelled)

The cyclomatic complexity of the following flow graph is :

Figure

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. 4

Explanation

The graph has 9 nodes (1, 2, 3, 4, 5, 6, 7, 9, 10) and 11 edges, so V(G) = 11 − 9 + 2 = 4. Equivalently, nodes 1, 2 and 4 are decisions: 3 + 1 = 4.

More Software Engineering questions