A program P reads in 500 integers in the range [0..100] representing the…

GATE · 2005 · CS

A program P reads in 500 integers in the range [0..100] representing the scores of 500 students. It then prints the frequency of each score above 50. What would be the best way for P to store the frequencies?

  1. A.

    An array of 50 numbers

  2. B.

    An array of 100 numbers

  3. C.

    An array of 500 numbers

  4. D.

    A dynamically allocated array of 550 numbers

Attempted by 1849 students.

Show answer

Correct answer: A

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…