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

  1. A.

    n−e+2p

  2. B.

    e−n+2+p

  3. C.

    e−n+2p

  4. 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.

Explore the full course: Niacl Ao It Specialist