1. Home
  2. Computer Science MCQs
  3. Software Engineering
  4. A program's control flow graph has 9 edges, 7 nodes and 1…

Added 2 Nov 2026

A program's control flow graph has 9 edges, 7 nodes and 1 connected component. What is its cyclomatic complexity?

  1. 2
  2. 16
  3. 3
  4. 4 Correct answer

Correct answer

D. 4

15 views

MCQSEXAM

Explanation

McCabe's cyclomatic complexity V(G) = E − N + 2P = 9 − 7 + 2 = 4. It gives the number of independent paths, and so the minimum number of test cases for branch coverage.

Reference

Asked in: GATE CS, NTS, Technical Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Software Engineering MCQs

Practise all Software Engineering MCQs

Similar MCQs