Returns an integer value
Int arr_max(int *x, int M){} meets your requirements.

A two-dimensional array can be regarded as a one-dimensional array. * * * has 2*M elements. Find the biggest one. Return.

# include & ltstdio.h & gt

# include & ltstdlib.h & gt

int arr_max(int *x,int M){

int n,I,r;

n = 2 * M; //* * * has 2*M elements.

r = x[0];

for(I = 0; I & ltn;; i++)if(x[I]& gt; r)r = x[I];

return r;

}

main(){

int a[2][5]={ 1,2,3, 10,9,8,6,7,5,4 };

int M = 5;

int r;

r = arr _ max(& amp; a[0][0],M); //Call the method

printf("%d ",r);

Returns 0;

}