The purpose of this assignment is to provide the student with experience with structures and dynamic memory in a C program.

computer science

Description

The purpose of this assignment is to provide the student with experience with structures and dynamic memory in a C program. It will incorporate lessons learned on header files and libraries. The assignment will be contained within multiple files. This assignment will be a continuation of the work in Assignment Three. A matrix (3-D array) will be created and populated with unique (non-repeating) values within the range of the maximum elements of the matrix. For a 2x3x4 matrix, this range would be the integers between 1 and 24 inclusive. The matrix will not be sorted for this assignment. The amount of data is unknown, and the program must be able to handle any volume of data. This means the program will have to allow for any amount of data. This will be accomplished by using dynamic memory allocation. The data will be encapsulated within a structure. This structure will contain all the variables utilized by the matrix. All arrays within this structure must be dynamically allocated. The structure itself will be in the main() call frame and it will need to passed to functions to compete the assignment tasks. The program will also compute and display the totals and the averages for each row of the matrix, along with the totals and average for each column and each layer. It will also display the total of all the values of the matrix. The program will allow for any size of the 3-D matrix. This also will require the utilization of different array sizes for the accumulation of the totals depending on the user’s input. Your program must be written using dynamically allocated memory to process any number of layers and rows and columns. Therefore, using a set size array of layers, rows and columns is not viable. No constant values can be used in the array declarations.

Instruction Files

Related Questions in computer science category