CS FundamentalsHardAccenture · Tech Mahindra pattern
A control flow graph has 27 edges and 19 nodes, split across 2 separate connected components. What is its cyclomatic complexity?
- A. 14
- B. 12
- C. 10
- D. 8
Correct answer: B. 12
V(G) = E − N + 2P = 27 − 19 + 2(2) = 12. Assuming a single component (P = 1) wrongly gives 10.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A control flow graph has 24 edges and 16 nodes, split across 2 separate connected components. What is its cyclomatic complexity?
- A control flow graph has 26 edges and 18 nodes. What is its cyclomatic complexity?
- Counting each simple condition in a compound boolean expression as a separate decision, what is the cyclomatic complexity of this…
- Counting each simple condition in a compound boolean expression as a separate decision, what is the cyclomatic complexity of this…
- Counting each simple condition in a compound boolean expression as a separate decision, what is the cyclomatic complexity of this…
- Counting each simple condition in a compound boolean expression as a separate decision, what is the cyclomatic complexity of this…