...
Question 9140 – GATE 2008
December 26, 2023
Question 8899 – ISRO CS 2020
December 26, 2023
Question 9140 – GATE 2008
December 26, 2023
Question 8899 – ISRO CS 2020
December 26, 2023

Question 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

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.

A
3
B
2
C
4
D
1
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!