Question: This is the code: stats.c: #include #include #include stats.h //TODO: fix the error in this function void readInArray(int *arr, int size) { int i; printf(Enter

This is the code:
stats.c:
#include
#include "stats.h"
//TODO: fix the error in this function void readInArray(int *arr, int size) { int i; printf("Enter your list of numbers: "); for (i = 0; i
int * generateRandomArray(int size) { int * randomArr = malloc(sizeof(int) * size); for(int i=0; i void printArray(const int *arr, int size) { printf("["); for(int i=0; i double getMean( , ) { } int getMin( , ) { } int getMax( , ) { } stats.h : /** * This function prompts and reads in a collection of numbers * from the standard input and populates the given array. The * provided array must be properly initialized for this function * to work. */ void readInArray(int *arr, int size); /** * Generates a random array of integers of the given * size. This function assumes that the random number * generator has already been seeded. */ int * generateRandomArray(int size); /** * Prints the given array to the standard output */ void printArray(const int *arr, int size); /* * TODO: * 1. Write prototypes for each of these functions * 2. Write documentation for each of these functions * 3. Implement the functions in stats.c */ double getMean( , ); int getMin( , ); int getMax( , );
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
