// Array Col Average // array_col_average.c // // This program calculates the average of each column in a 2D array #include #define MAX_SIZE 100 // DO NOT CHANGE THIS FUNCTION PROTOTYPE void array_col_average(int array[MAX_SIZE][MAX_SIZE], int num_rows, int num_cols); // This is a simple main function that you can use to test your // array_col_average function. // It will not be marked - only your array_col_average function will be marked. // // Note: the autotest does not call this main function! // It calls your array_col_average function directly. // Any changes that you make to this main function will not affect the autotests. int main(void) { // Declares and initialises a 2D array int array[MAX_SIZE][MAX_SIZE] = { {0, 1, 9, 2}, {5, 4, 6, 7}, {7, 6, 3, 9}, {3, 8, 1, 8} }; // Calculates averages of the columns of the first array printf("First array: \n"); array_col_average(array, 4, 4); // Declares and initialises another 2D array int array2[MAX_SIZE][MAX_SIZE] = { {0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 8, 7} }; // Calculates averages of the columns of the second array printf("\nSecond array: \n"); array_col_average(array2, 4, 3); return 0; } // Calculates the sum of each col of the array and prints it out void array_col_average(int array[MAX_SIZE][MAX_SIZE], int num_rows, int num_cols) { // TODO: Complete this function }