For this part write a complete C program that opens the data
Solution
Here is the code for you:
#include <stdio.h>
 #define SIZE 300
 int main()
 {
 FILE *fp = fopen(\"hugedata.txt\", \"r\");
 int array[SIZE];
 for(int i = 0; i < SIZE; i++)
 fscanf(fp, \"%i\", &array[i]);
 fclose(fp);
 int sum = 0;
 for(int i = 0; i < SIZE; i++)
 sum += array[i];
 int large, small;
 large = small = array[0];
 for(int i = 1; i < SIZE; i++)
 {
 if(array[i] > large)
 large = array[i];
 if(array[i] < small)
 small = array[i];
 }
 int cat1 = 0, cat2 = 0, cat3 = 0, cat4 = 0;
 for(int i = 0; i < SIZE; i++)
 if(array[i] >= 1 && array[i] < 5)
 cat1++;
 else if(array[i] >= 6 && array[i] < 10)
 cat2++;
 else if(array[i] >= 11 && array[i] < 15)
 cat3++;
 else if(array[i] >= 16 && array[i] < 20)
 cat4++;
 printf(\"The largest data value in the data set is: %i\ \", large);
 printf(\"The smallest data value in the data set is: %i\ \", small);
 printf(\"The total numbers in the range 1 <= N < 5 is: %i\ \", cat1);   
 printf(\"The total numbers in the range 6 <= N < 10 is: %i\ \", cat2);
 printf(\"The total numbers in the range 11 <= N < 15 is: %i\ \", cat3);
 printf(\"The total numbers in the range 16 <= N < 20 is: %i\ \", cat4);
 }

