CS FundamentalsVery hardGATE CS · TCS NQT Prime · Product Company SDE
A control-flow graph has 8 edges, 7 nodes and 1 connected component. Using V(G) = E − N + 2P, what is its cyclomatic complexity?
- A. 7
- B. 3
- C. 1
- D. 6
Correct answer: B. 3
V(G) = E - N + 2P = 8 - 7 + 2(1) = 3, using the standard cyclomatic complexity formula.
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
- Why is the waterfall model still sometimes chosen for certain regulated domains (e.g. some safety-critical or compliance-heavy systems)…
- A control-flow graph has 11 edges, 8 nodes and 1 connected component. Using V(G) = E − N + 2P, what is its cyclomatic complexity?
- A Scrum team completed 21, 21, 39, 20 story points in its last 4 sprints. The remaining backlog is 152 points. Using average velocity, how…
- A function has 2 independent input variables, each with its own valid range. Using robust BVA (standard BVA plus one invalid value just…
- A reporting class depends directly on a concrete EmailSender class to send alerts. A new requirement asks for alerts to optionally go via…
- Two components with availability 97.0% and 90.0% are connected in series (the system works only if both are up). What is the system's…