ProgrammingModerateTCS NQT · Infosys

How many distinct strings can be formed by arranging the letters of AABB?

  1. A. 12
  2. B. 4
  3. C. 6
  4. D. 24

Correct answer: C. 6

Arranging 4 letters with two A and two B gives 4! / (2! * 2!) = 6 distinct strings. Dividing out the repeated letters avoids counting identical arrangements twice.

More C Programming questions

Exams that ask this topic