Question 9140 – GATE 2008
December 26, 2023Question 8899 – ISRO CS 2020
December 26, 2023Question 8946 – ISRO CS 2020
Consider the following pseudo code
I=0; J=0; K=8;
while(I<k-1) while-1=""
{
J=J+1;
while(J<k) while-2=""
{
if(J<k)
{
temp=x[I])
x[I] = x[J];
x[J]=temp;
}
} // end of while-2
I=I+1;
} // end of while-1
The cyclomatic complexity of the above is
Correct Answer: C
Question 75 Explanation:
Cyclomatic complexity is a software metric used to indicate the complexity of a program. It is a quantitative measure of the number of linearly independent paths through a program’s source code.
The complexity M is then defined as
The complexity M is then defined as
M = E − N + 2P,
where
E = the number of edges of the graph.
N = the number of nodes of the graph.
P = the number of connected components.
3
2
4
1
Subscribe
Login
0 Comments