CS FundamentalsHardGATE CS · Software Engineering · Advanced

The decision (A and B) or (C and D) contains four conditions. What is the minimum number of test cases that achieves 100% modified condition/decision coverage (each condition independently shown to affect the outcome by a pair of tests that differ only in that condition)?

  1. A. 4
  2. B. 5
  3. C. 8
  4. D. 16

Correct answer: B. 5

MC/DC needs at least n + 1 tests for n conditions; a search over all 16 input combinations confirms that 5 suffice here (and 4 cannot). Full condition combinations would need 16 tests.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic