CS FundamentalsVery hardGATE CS · TCS NQT
A control-flow graph has 20 edges, 16 nodes and 2 connected components. Using V(G) = E - N + 2P, what is the cyclomatic complexity?
- A. 6
- B. 8
- C. 10
- D. 4
Correct answer: B. 8
V(G) = 20 - 16 + 2 x 2 = 8; using P = 1 would wrongly give 6.
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
- Commits A-B-C-D-E are on the shared main branch and already pushed. Commit C introduced a bug. What is the safest way to undo only C's…
- A module contains functions to print to screen, write to a file and send over a network; a flag argument decides which one runs. Which…
- A load balancer with 99.9% availability fronts two redundant servers (parallel), each with 90% availability. System works if the balancer…
- A mutation test run generated 40 mutants. 4 are equivalent mutants and 28 were killed. What is the mutation score, excluding equivalent…
- Branch main has commit A. Branch feature was created from A and has commits B and C. After git merge --no-ff feature on main, how many…
- An object wraps another object that implements the same interface, adding behaviour dynamically before or after delegating (as…