The cyclomatic complexity of the following flow graph is :

Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. 4
Explanation
The graph has 9 nodes (1, 2, 3, 4, 5, 6, 7, 9, 10) and 11 edges, so V(G) = 11 − 9 + 2 = 4. Equivalently, nodes 1, 2 and 4 are decisions: 3 + 1 = 4.
More Software Engineering questions
- Match List-I with List-II : Chowe the correct answer from the options given below :
- Given below are two statements : Statement (I) : In Reuse Oriented Model, Modification of the old system parts appropriate to the new requi…
- Given below are two statements: one is labeled as Assertion A and the other is labeled as Reason R. Assertion A: Validity checks the real n…
- Match List I with List II. List I: A. PERT, B. Optimistic time, C. CPM, D. Pessimistic time. List II: I. Used for non-repetitive jobs, II.…
- Match List I with List II. List I: A. Scenario testing, B. Regression testing, C. Component testing, D. Beta testing. List II: I. To verify…
- The time between failures for a software system is: failure 1 – 6 hours, failure 2 – 4 hours, failure 3 – 8 hours, failure 4 – 5 hours, fai…