Software Engineering · Question 7 · Medium
A program's control flow graph has 9 edges and 7 nodes and is a single connected component. What is its cyclomatic complexity?
- 4
- 3
- 5
- 2
Answer and explanation
Answer: A. 4
Explanation: McCabe's cyclomatic complexity is V(G) = E - N + 2P = 9 - 7 + 2 × 1 = 4.
Previous: A form field accepts an age from 18 to 60, inclusive. Which set of test values… · Next: What is the main purpose of regression testing?
Practise software engineering
Try a fresh set of software engineering questions with an explanation after every answer, free and without signing up: Software Engineering practice. Or sit a full placement mock test.
More software engineering questions
- Which git command creates a local copy of an existing remote repository?
- Black-box testing designs test cases based on:
- A form field accepts an age from 18 to 60, inclusive. Which set of test values…
- What is the main purpose of regression testing?
- What distinguishes the Spiral model from other SDLC models?
- What is the difference between git fetch and git pull?
- Good software design aims for which combination of cohesion and coupling?
- A function accepts an integer age that is valid from 18 to 60. Using…
- What happens after running git reset --soft HEAD~1?
- When does git perform a fast-forward merge of branch feature into main?
More technical & programming practice
Cloud & DevOps · GenAI Basics · Pseudo-code · C Programming · Java · Python · Data Structures · Algorithms
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge