N is the number of nodes of the control graph and E is the number of edges in the control flow graph. What is Mc Cabe's cyclomatic complexity V(G)?
Show answerHide answer
Correct answer: (B) V(G) = E − N + 2
Explanation
McCabe's cyclomatic complexity for a connected control flow graph is V(G) = E − N + 2 (or number of decisions + 1).