[Solved]Write Function Named Flatten Takes Matrix Integers Dimensions Arguments Returns 1d Array A Q37217525
Write a function named flatten, that takes a matrix of integersand their dimensions as the arguments, then returns a 1D array suchthat this array is the “flattened” version of the matrix.Demonstrate the function in the main program. The prototype of thefunction should look like: int* transpose(int** matrix, int nrow,int ncol); Sample input: Sample output: 12 3 1 2 3 4 5 45 6
Expert Answer
Answer to Write a function named flatten, that takes a matrix of integers and their dimensions as the arguments, then returns a 1D… . . .
OR

