Question 554 – Software-Engineering
December 9, 2023Question 733 – Software-Engineering
December 9, 2023Question 568 – Software-Engineering
The Cyclomatic Complexity metric V(G) of the following control flow graph
Correct Answer: B
Question 81 Explanation:
Cyclomatic complexity is the measurement of a source code complexity.
It is calculated through a control flow graph which is developed on the basis of source code which measures the number of linearly-independent paths through a program module
The Cyclomatic Complexity of a graph = E − N + 2*P, where
where,
E = represents a number of edges in the control flow graph.
N = represents a number of nodes in the control flow graph.
P = represents a number of nodes that have exit points in the control flow graph.
From the given graph has: E = 7, N = 5 and P = 1
Cyclomatic Complexity = 7 – 5 + 2(1) = 4
It is calculated through a control flow graph which is developed on the basis of source code which measures the number of linearly-independent paths through a program module
The Cyclomatic Complexity of a graph = E − N + 2*P, where
where,
E = represents a number of edges in the control flow graph.
N = represents a number of nodes in the control flow graph.
P = represents a number of nodes that have exit points in the control flow graph.
From the given graph has: E = 7, N = 5 and P = 1
Cyclomatic Complexity = 7 – 5 + 2(1) = 4
3
4
5
6
Subscribe
Login
0 Comments