Question: (15 points) Implement a function that converts a 2-D array to a 1-D array by storing consecutive elements in a column of the 2-D matrix

(15 points) Implement a function that converts a 2-D array to a 1-D array by storing consecutive elements in a column of the 2-D matrix in the 1-D array, starting from the first column. (10 minutes) For example, given the following 2-D array (i.e., int** !array_2d), 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 printed via the following function: int rows = 5; int cols = 5; for(int i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
