Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | Gate IT 2007 | Question 53

Improve Article
Save Article
Like Article
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article
Like Article

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

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!