I did a code and I test in a different one just to make sure it works because it belongs to a switch, to be honest I have problems with functions I know how the parameters works but my real problem is the use of multidimensional arrays without pointers (because I don't know how to use them).
int ar, ac, br, bc, d, e, f;
int readMat(int mat[d][e], int row, int col) //Don't know what to do with mat[d][e]
{
for(d=0;d<row;d++)
{
for(e=0;e<col;e++)
{
p("[%d][%d]: ",d+1,e+1);
s("%d", &mat[d][e]);
}
}
}
main()
{
//Scans for the rows and col
printf("Numero de renglonesde la matriz A: ");
scanf("%d", &ar); //Mat A row
printf("Numero de columnas de la matriz A: ");
scanf("%d", &ac); //Mat A col
printf("Numero de renglones de la matriz B: ");
scanf("%d", &br); //Mat B row
printf("Numero de columnas de la matriz B: ");
scanf("%d", &bc); //Mat b col
if(ac!=br)
{
printf("No es posible hacer la multiplicación.\n");
system("pause");
return 0;
}
int A[ar][ac], B[br][bc], C[ar][bc];
p("Escriba el valor de la primer matriz");
int readMat(A[d][e],ar,ac); //Use of the function
}
Edit: I couldn't solve not using pointer even how Marian explain me. I know pointers are necessary but is a topic that I didn't use in class (I don't know how the teacher wanted us to solve it) so I wasn't allowed to 'use'.