If a software control flow graph has 10 edges ($E$) and 7 nodes ($N$) with 1 connected component ($P=1$), its Cyclomatic Complexity $V(G)$ is:
A3
B5
C7
D12
Explanation
Using McCabe’s formula $V(G) = E – N + 2P = 10 – 7 + 2(1) = 5$.
Exam Relevance
- Topic: Software Metrics
- Subtopic: McCabe Formula

No Comments