CS FundamentalsModerateCognizant · Capgemini pattern

A control flow graph has 7 edges and 6 nodes. What is its cyclomatic complexity?

  1. A. 0
  2. B. 6
  3. C. 3~1
  4. D. 3

Correct answer: D. 3

V(G) = E − N + 2P = 7 − 6 + 2(1) = 3.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic