McCabe's cyclomatic complexity number of a program control graph 'G' with e…
2023
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
Show answer & explanation
Correct answer: C
McCabe's cyclomatic complexity V(G) is determined by the formula V(G) = E - N + 2P. Here, E represents the number of edges in the control graph, N is the number of nodes, and P denotes the number of disconnected paths.