CS FundamentalsHardGATE CS · TCS NQT Prime · Product Company SDE

A control-flow graph has 19 edges, 16 nodes and 1 connected component. Using V(G) = E − N + 2P, what is its cyclomatic complexity?

  1. A. 6
  2. B. 1
  3. C. 5
  4. D. 4

Correct answer: C. 5

V(G) = E - N + 2P = 19 - 16 + 2(1) = 5, using the standard cyclomatic complexity formula.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic