HOW TO FIND CYCLOMATIC COMPLEXITY

| Monday, 16 December 2013

Consider the following pseudo-code :
If (A > B ) and (C > D) then
A = A + 1
B = B + 1
Endif
The cyclomatic complexity of the pseudo-code
is
(A) 2
(B) 3
(C) 4
(D) 5
ANSWER :3

V(G)=p+1 where p is the no of predicates.Here
we have two predicates or two conditions.ther
efore 2 + 1 =3

0 comments:

Post a Comment

Next Prev
▲Top▲