Compiler-Design
October 7, 2023Normalization
October 7, 2023Software-Engineering
|
Question 87
|
Which one of the following statements is incorrect?
|
The number of regions corresponds to the cyclomatic complexity.
|
|
|
Cyclomatic complexity for a flow graph G is V(G) = N – E + 2, where E is the number of edges and N is the number of nodes in flow graph.
|
|
|
Cyclomatic complexity for a flow graph G is V(G) = E – N + 2, where E is the number of edges and N is the number of nodes in flow graph.
|
|
|
Cyclomatic complexity for a flow graph G is V(G) = P + 1, where P is the number of predicate nodes contained in the flow graph G.
|
Question 87 Explanation:
To find the cyclomatic complexity using three formulas.
The number of regions
Predicate(P) + 1 [ Predicate divides minimum 2 or more ]
E-N+2
The number of regions
Predicate(P) + 1 [ Predicate divides minimum 2 or more ]
E-N+2
Correct Answer: B
Question 87 Explanation:
To find the cyclomatic complexity using three formulas.
The number of regions
Predicate(P) + 1 [ Predicate divides minimum 2 or more ]
E-N+2
The number of regions
Predicate(P) + 1 [ Predicate divides minimum 2 or more ]
E-N+2
