Question: Iask 1 : Arrays and Structure ( 2 0 pt ) In this task, we will create a structure called myArray and it will have

Iask 1: Arrays and Structure (20pt)
In this task, we will create a structure called myArray and it will have the following members:
A[1000] : an array that stores up to 1000 integer numbers. A is the 1D representation of a 3D array
shape[3]: an array that contains the dimensions of the 3D array.
Subtasks:
Create a structure myArray. Must finish in Lab. (2pt)
Create a function called random that creates a structure myArray. Must finish in Lab. (3pt)
Create a function called sum that returns the sum of the matrices. Must finish in Lab.(3pt)
Create a function called print to print the 3D array. Must finish in Lab. (2pt)
Create a function called multiply that returns the element-wise matrix multiplication between two matrices. Must finish in Lab. (3pt)
Create a function called matmul that return the matrix multiplication between two matrices. This operation is only perform to the last two dimensions of the array(5pt)
Create one or more functions to check if the operation can be performed. Do not consider broadcasting. (2pt)
For all the function except random and the ones used to check, the only type of argument allowed is myArray. Note: Pointers are not allowed. Built-in functions are not allowed.
 Iask 1: Arrays and Structure (20pt) In this task, we will

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!