GATE | Gate IT 2007 | Question 53
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: (C)
Explanation: Cyclomatic complexity = (π − s + 2)
where π is the number of decision points in the program, and s is the number of exit points.
Quiz of this Question
Please comment below if you find anything wrong in the above post
Please Login to comment...