I have written the below code but I am getting these errors and warnings which I am unable to resolve within this code.
In function 'main':
[Warning] passing argument 1 of 'matrix_read' makes integer from pointer without a cast
[Note] expected 'int' but argument is of type 'int (*)[(sizetype)(no_of_columns)]'
In function 'matrix_read':
[Error] subscripted value is neither array nor pointer nor vector
#include <stdio.h>
int no_of_rows, no_of_columns;
int matrix_read(int read_input);
int main() {
int matrixA[no_of_rows][no_of_columns];
printf("Enter the number of rows:");
scanf("%d", &no_of_rows);
printf("Enter the number of columns:");
scanf("%d", &no_of_columns);
matrix_read(matrixA);
return 0;
}
//Function to read the value from the users
int matrix_read(int read_input){
int i,j;
for(i=0; i < no_of_rows; i++ ){
for(j=0; j < no_of_columns; j++){
printf("Enter the elemnts [%d][%d]: ", i+1, j+1);
scanf("%d", &read_input[i][j]);
}
}
} ```