528 views
4 votes
4 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

2 Answers

Best answer
16 votes
16 votes
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
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

0 votes
0 votes
2 answers
2
Arjun asked Oct 10, 2016
544 views
Consider the following declaration of a two dimensional array in C:char a[1000][40];Assuming that the main memory is byte addressable and that the array is stored startin...
4 votes
4 votes
1 answer
3
Arjun asked Oct 10, 2016
781 views
In a Network where bytes are continuously being transferred, it is required to identify the most frequently transferred byte. What would be an appropriate data structure ...
2 votes
2 votes
2 answers
4
Arjun asked Oct 10, 2016
749 views
What would be an appropraite data structure to represent family hierarchy where each node is an individual and there in no requirement to keep "married to" relationship?B...