Question 49Asked in DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1

N is the number of nodes of the control graph and E is the number of edges in the control flow graph. What is Mc Cabe's cyclomatic complexity V(G)?

  1. AV(G) = E + N + 2
  2. BV(G) = E − N + 2
  3. CV(G) = E + N − 2
  4. DV(G) = E − N − 2
Show answerHide answer

Correct answer: (B) V(G) = E − N + 2

Explanation

McCabe's cyclomatic complexity for a connected control flow graph is V(G) = E − N + 2 (or number of decisions + 1).

From DSSSB TGT Computer Science PYQ (Technical), 1 Aug 2021, Shift 1

This is question 49 of DSSSB TGT Computer Science PYQ (Technical), 1 Aug 2021, Shift 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.