GATE 2002
November 15, 2023Question 16143 – Arrays
November 15, 2023Arrays
Question 9 |
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?
An array of 50 numbers | |
An array of 100 numbers | |
An array of 500 numbers | |
A dynamically allocated array of 550 numbers |
Question 9 Explanation:
→ Here we are storing values above 50 and we are ignoring the scores which is less than 50.
→ Then using array of 50 numbers is the best way to store the frequencies.
→ Then using array of 50 numbers is the best way to store the frequencies.
Correct Answer: A
Question 9 Explanation:
→ Here we are storing values above 50 and we are ignoring the scores which is less than 50.
→ Then using array of 50 numbers is the best way to store the frequencies.
→ Then using array of 50 numbers is the best way to store the frequencies.
Subscribe
Login
0 Comments