Placement AptitudeVery hardProduct company OA · CAT LRDI level

In a batch of 120 students, every student knows at least one of Java, Python and C. 80 know Java, 70 know Python and 60 know C. What is the greatest possible number of students who know all three languages?

  1. A. 60
  2. B. 40
  3. C. 45
  4. D. 30

Correct answer: C. 45

Count language-memberships: 80 + 70 + 60 = 210 among 120 students, so the 'extra' memberships are 90 = (number knowing exactly two) + 2 × (number knowing all three). To maximise those knowing all three, make nobody know exactly two: 2t = 90, t = 45. This is achievable: 35 know only Java, 25 only Python, 15 only C, 45 all three (35 + 25 + 15 + 45 = 120). 60 (the smallest set) ignores that everyone must know at least one language; 30 divides 90 by 3.

More Logical Reasoning for Placements questions

Exams that ask this topic