CS FundamentalsModerateTCS NQT · Infosys pattern

An age field accepts integers from 18 to 60 inclusive. Using equivalence partitioning only, what is the minimum number of test values needed to cover every class once?

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

Correct answer: B. 3

Classes: below 18 (invalid), 18–60 (valid), above 60 (invalid) → one value each = 3. 6 or 7 values come from boundary value analysis, a different technique.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic