in DS
326 views
3 votes
3 votes

In a class examination marks was out of 100 and there were only 1 or 2 mark questions with total 70 questions and pass mark being 36. In order to find the most repeating total mark among passed students, the appropriate data structure would be

  1. An array of 100 numbers
  2. An array of 70 numbers  
  3. An array of 65 numbers  
  4. A dynamically allocated array of 100 numbers
in DS
by
326 views

2 Answers

15 votes
15 votes
Best answer
In order to find the most frequently occuring pass mark we need to count the frequency of each of them. From 36-100 there are 65 unique marks and hence we need an array of size 65 to store their individual frequencies.
selected by
by

1 comment

I did never thought of the question in this way.

Thanks BTW!!!
0
0
0 votes
0 votes
we need to store  frequencies of students who passed that means marks >=36

which are 36,37,38 ,...100  it is 65 in total

we can have an array of 65 int having number of students who get marks >=36 in order like in first box number of student got 36 marks and goes on last box have number of student having 100 marks.
Answer:

Related questions