...
NIC-NIELIT Scientist-B 2020
October 25, 2023
JNU CS M.Phil 2019 Shift-1
October 26, 2023
NIC-NIELIT Scientist-B 2020
October 25, 2023
JNU CS M.Phil 2019 Shift-1
October 26, 2023

Nielit STA [02-12-2018]

Question 3
A program P reads in 1000 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?
A
An array of 50 numbers
B
An array of 100 numbers
C
An array of 500 numbers
D
A dynamically allocated array of 550 numbers
Question 3 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.
Correct Answer: A
Question 3 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.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!