Software-Engineering
August 26, 2024Software-Engineering
August 26, 2024Software-Engineering
|
Question 338
|
What is the Cyclomatic Complexity of the following flow-graph of a software code?
|
10
|
|
|
4
|
|
|
8
|
|
|
2
|
Question 338 Explanation:
Step-1: To find cyclomatic complexity we have 3 formulas.
Number of regions(R) + 1
Predicates(P) + 1
Edges(E) – Vertex(V) + 2
Step-2: We can apply any formula to find cyclomatic complexity.
Step-3: 8 vertex and 10 edges.
10 – 8 + 2 = 4
Number of regions(R) + 1
Predicates(P) + 1
Edges(E) – Vertex(V) + 2
Step-2: We can apply any formula to find cyclomatic complexity.
Step-3: 8 vertex and 10 edges.
10 – 8 + 2 = 4
Correct Answer: B
Question 338 Explanation:
Step-1: To find cyclomatic complexity we have 3 formulas.
Number of regions(R) + 1
Predicates(P) + 1
Edges(E) – Vertex(V) + 2
Step-2: We can apply any formula to find cyclomatic complexity.
Step-3: 8 vertex and 10 edges.
10 – 8 + 2 = 4
Number of regions(R) + 1
Predicates(P) + 1
Edges(E) – Vertex(V) + 2
Step-2: We can apply any formula to find cyclomatic complexity.
Step-3: 8 vertex and 10 edges.
10 – 8 + 2 = 4
