Data Structures & AlgorithmsHardGATE CS · TCS NQT

How many trailing zeros does 2^7 * 5^4 * 10 have in decimal?

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

Correct answer: B. 5

Each factor of 10 needs a 2 and a 5, so the trailing zeros count min(exponent of 2, exponent of 5) with the extra 10 contributing one each. Here the exponents of 2 and 5 are 8 and 5, so the answer is 5.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic