CS FundamentalsModerateCognizant · Capgemini pattern
A control flow graph has 7 edges and 6 nodes. What is its cyclomatic complexity?
- A. 0
- B. 6
- C. 3~1
- D. 3
Correct answer: D. 3
V(G) = E − N + 2P = 7 − 6 + 2(1) = 3.
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 31 edges and 22 nodes. What is its cyclomatic complexity?
- A control flow graph has 13 edges and 11 nodes. What is its cyclomatic complexity?
- A control flow graph has 17 edges and 13 nodes, forming 2 disconnected components. What is its cyclomatic complexity?
- A control flow graph has 22 edges and 15 nodes. What is its cyclomatic complexity?
- A control flow graph has 11 edges and 10 nodes. What is its cyclomatic complexity?
- A control flow graph has 6 edges and 5 nodes. What is its cyclomatic complexity?