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

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

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

Correct answer: C. 5

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

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic