Software-Engineering
December 9, 2023Software-Engineering
December 9, 2023Software-Engineering
Question 439 |
The Cyclomatic Complexity metric V(G) of the following control flow graph

3 | |
4 | |
5 | |
6 |
Question 439 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
Correct Answer: B
Question 439 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