ProgrammingModerate

A dynamic array grows from capacity 1 by doubling. How many doublings are needed to reach capacity 1024 from 1?

  1. A. 10
  2. B. 9
  3. C. 11
  4. D. 1024

Correct answer: A. 10

The capacities go 1, 2, 4, ..., 1024, which is 10 doublings since 2^10 = 1024.

More C Programming questions

Exams that ask this topic