Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c++. 8 Part 1 (EECS 168/169) Array Helper Functions Below is a list of functions, their parameters, and what they do void print2DArray(int* array,

image text in transcribed

image text in transcribed

image text in transcribed

In c++.

8 Part 1 (EECS 168/169) Array Helper Functions Below is a list of functions, their parameters, and what they do void print2DArray(int* array, int rows, int cols) . Takes in a 2D array and prints it The array is unchanged int arraySum(int array, int size) . double arrayAvglint* array, int size) . int arraySum2D(int** array, int rows, int cols) . double arrayAvg2D(int** array, int rows, int cols) . int arrayMax2D(int* array, int rows, int cols) See sample run for formatting . Takes in a 1D array and returns the sum of all values . Takes in a 1D array and returns the average of all values . Takes in a 2D array and returns the sum of all values . Takes in a 2D array and returns the average of all values Takes in a 2D array and returns the largest value in the entire array . int** arrayFromFile(std::string fileName, int& numRows, int& numCols) . Creates a 2D array based on the specifications in the file Sets the ints passed by reference to the dimensions of the array . Returns a pointer to the 2D array . Assumes the following file format: Example file for an array with 2 rows 3 columns: 2 3 9 4 10 7 2 7964 Note: so be written as int. arti, also int. arr could be written as int amt, There is a slight difference. but either are acceptable for this program. . int main) Call your other function to handle as much of the work as possible! For example, use main.cp

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How can perpetuity have a finite value?

Answered: 1 week ago