SSC IMD SA Mock 02 – Question 160

Question:

What is the Cyclomatic Complexity \(V(G)\) of a control flow graph with 14 edges and 10 nodes having 1 connected component?
14 किनारों (edges) और 10 नोड्स वाले नियंत्रण प्रवाह ग्राफ की साइक्लोमैटिक जटिलता \(V(G)\) क्या है, जिसमें 1 कनेक्टेड घटक है?

Options:

  • 6
  • 4
  • 5
  • 8
  • 6
  • 4
  • 5
  • 8

Correct Answer: a)

Explanation:

McCabe’s Cyclomatic Complexity formula is \(V(G) = E – N + 2P\), where \(E = 14\) is edges, \(N = 10\) is nodes, and \(P = 1\) is connected components.
\(V(G) = 14 – 10 + 2(1) = 4 + 2 = 6\).
मैककेब के साइक्लोमैटिक जटिलता सूत्र \(V(G) = E – N + 2P\) के अनुसार:
\(V(G) = 14 – 10 + 2(1) = 6\)।

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top