Question: Need this code converted so it does not have any pointers implemented #include #include int max(int m,int n,int array[m*n]) { int i,j,currentMax=array[0]; //To store current

Need this code converted so it does not have any pointers implemented

#include #include int max(int m,int n,int array[m*n]) { int i,j,currentMax=array[0]; //To store current maximum value for (i = 0; i < m; ++i) { for (j = 0; j < n; ++j) { if(currentMax < array[i*n+j]) //Larger elements appears currentMax = array[i*n+j]; //update current maximum } } return currentMax; } void rowSum(int m,int n,int array[m*n]) { int i,j,sum; //To store total sum for (i = 0; i < m; ++i) { sum = 0; for (j = 0; j < n; ++j) sum = sum + array[i*n+j] ; //Add sum of every row element printf("Sum of row %d is %d ",i+1,sum); } printf(" "); } void columnSum(int m,int n,int array[m*n]) { int i,j,sum; //To store total sum for (j = 0; j < n; ++j) { sum = 0; for (i = 0; i < m; ++i) sum = sum + array[i*n+j]; //Add sum of every column element printf("Sum of column %d is %d ",j+1,sum); } printf(" "); } void isSquare(int m,int n,int array[m*n]) { if(m==n) //check whether number of rows and columns are same printf("This is a square array "); else printf("This is not a square array "); printf(" "); } void displayOutputs(int m,int n,int array[m*n]) { int i,j; printf("Here is your 2D array: "); for(i=0; i

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!