ISQI Certified Tester Foundation Level — Question 13
Given the Following program IF X <>= ZTHEN Statement 2;ENDMcCabe’s Cyclomatic Complexity is :
Answer options
- A. 2
- B. 3
- C. 4
- D. 5
Correct answer: B
Explanation
McCabe’s Cyclomatic Complexity is calculated based on the number of edges and nodes in the control flow graph. In this case, the presence of the conditional statement creates three distinct paths, leading to a complexity of 3. The other options do not accurately reflect the number of independent paths through the program.