ProgrammingModerate

A program uses a 2D table of size 1000 x 1000 with an O(1) update per cell and 1000 passes. How many cell updates are done?

  1. A. 10^6
  2. B. 2 x 10^6
  3. C. 10^9
  4. D. 10^12

Correct answer: C. 10^9

There are 10^6 cells updated in each of the 1000 passes, which is 10^9 updates.

More C Programming questions

Exams that ask this topic