ProgrammingHardTCS NQT · Infosys

How many positive divisors does 40 have?

  1. A. 6
  2. B. 10
  3. C. 8
  4. D. 4

Correct answer: C. 8

The divisors are 1, 2, 4, 5, 8, 10, 20 and 40, which is 8. Pairing divisors up to sqrt(40) is the standard way to count them quickly.

More C Programming questions

Exams that ask this topic