Question: C Program Homework: When a two-dimensional array is passed as a parameter to a function, the column size of the array has to be included

C Program Homework:

C Program Homework: When a two-dimensional array is passed as a parameter

to a function, the column size of the array has to be

When a two-dimensional array is passed as a parameter to a function, the column size of the array has to be included in the functional declaration. Example: void calculate(int a[14], int rows) Task 8.1 Using C programming language, write functions to perform Matrix Addition, Subtraction, Multiplication and Division Create the following functions: a fill_array. The function receives a two-dimensional integer array, row size, minimum value and maximum value as parameter. The function should generate random numbers between the minimum and maximum values and fill the array. b.write_array. Write a function to print that will receive a two-dimensional integer array, and row size as parameters. The function to print all the values in a Matrix format. c. add_Matrix is a function that receives 2 two-dimensional arrays, and row size as input parameters. The function to print the addition of two arrays as output. d. sub Marix is a function that receives 2 two-dimensional arrays, and row size as input parameters. The function to print the difference of the first array from the second array e. multiply_Matrix is a function that receives 2 two-dimensional arrays, and row size as input parameters The function to print the product of array one with array 2. f. divide_Matrix is a function that receives 2 two-dimensional arrays, and row size as input parameters. The function to print the division of array one by array 2. g. main(). Create 2 two dimensional arrays. Fill both the arrays with random numbers. Perform addition, subtraction, multiplication and division. Task 8.2 A two dimensional array of size 10 rows and 4 columns, contains the marks of 10 students in 4 subjects. And a single dimensional array for size 10 has been created to store the average of the 10 students. Write a C program, that will calculate the average of 4 marks and store the average in the single dimensional array. Example: 1936 88 65 66 66 55 59 69.5 Task 8.3 Create a single dimension integer array of size 20. Using a function fill array (int all, int size) fill the array with 10 random numbers between 1 and 100 in alternate position of the array starting from the first position. Using a function fill_square(int al, int size), fill the remaining 10 empty position of the array with the previous positions value * 2. Using a function print_square(int a, int size). Print the array from 1st to the last value. Sara@DESKTOP-512SSJH /c/COS10008 $ out1 38 76 47 94 34 68 40 80 184 156 122 35 70 24 48 1 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!