CS FundamentalsVery hardGATE CS · TCS NQT Prime · Product Company SDE

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

  1. A. 10
  2. B. 8
  3. C. 12
  4. D. 5

Correct answer: B. 8

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

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic