Question: Classwork on Passing Two-D Arrays to Functions In function mam, declare a two dimensional integer array with 6 rows and 5 columns and other variables
Classwork on Passing Two-D Arrays to Functions In function mam, declare a two dimensional integer array with 6 rows and 5 columns and other variables for the maximum, row and column number and any other necessary variables. Call the following functions from function main. Call a function createArray to fill the two dimensional array with random integers between -50 and +50. Parameters for this function should be the array and the number of rows and columns (or you may use defined constants for the number of rows and columns). Call a second function column Maximum to find the largest value In each column of the array. The column maxima will be placed in a one-D array. The prototype for the is function will look something like this (assuming you are using symbolic constants for numbers of rows and columns: void column Maximum (int arr[][COL), int cMax[]); Do not print in the function; just write the maximum values into the one-dimensional array. Call a third function positives to find the number of positive values in the array. Return the number of positives pass by value. You may print the array, column maxima and the number of positives in function main (or for an extra challenge you may print in another function print Results)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
