CS FundamentalsHardTCS NQT · Infosys interview pattern

What is the minimum number of test cases needed to achieve MC/DC (modified condition/decision coverage) for the decision if (A && B)?

  1. A. 3
  2. B. 2
  3. C. 4
  4. D. 1

Correct answer: A. 3

Each condition must be shown to independently change the outcome. With (T, T) → true, (F, T) → false shows A’s effect and (T, F) → false shows B’s effect: 3 tests. 2 achieves only decision coverage; 4 is exhaustive combination testing. In general MC/DC needs n + 1 tests for n conditions.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic