Question: C Programming - Twenty students were asked to participate in a survey to rate their experience with a tutoring center on a scale of 1

C Programming - Twenty students were asked to participate in a survey to rate their experience with a tutoring center on a scale of 1 to 5 (where 1 means awful and 5 means excellent). Write a C program that stores the 20 responses entered by the user in an integer array and summarize the results by displaying the number of occurrences of each response (1 to 5). As part of the solution, write and call the function calculate() with the following prototype. n1 is the size of the array of the responses and n2 is the size of the array of frequency.

void calculate(int responses[], int n1, int frequency[], int n2);

Example input/output #1:

Enter 20 responses: 1 4 5 3 5 3 5 2 4 5 2 4 5 5 3 4 5 3 3 1

Output:

Rating Frequency

1 2

2 2

3 5

4 4

5 7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!