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

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

  1. A. 8
  2. B. 7
  3. C. 10
  4. D. 4

Correct answer: A. 8

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

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic