Topic: Software Engineering
McCabe's cyclomatic complexity number of a program control graph 'G' with e edges, n nodes and p disconnected paths is defined as
- A. $n-e+2p$
- B. $e-n+2+p$
- C. $e-n+2p$
- D. $n-e+p$
Answer: C. $e-n+2p$
Explanation: Thomas McCabe's Cyclomatic Complexity formula for a control flow graph is $V(G) = E - N + 2P$, where E is the number of edges, N is the number of nodes, and P is the number of connected components (or disconnected subgraphs/paths).