Hi, I got an assignment of doing a program to make the sum, substraction, etc. of a matrix A and a matrix B of given dimensions (Via keyboard, via detection, any method was possible).
I used dynamic memory allocation with three double ** A, **B, **C and used calloc to create the 2 dim arrays but, then I found this code on the net:
No warning, compiles, and is shorter than memory allocation, as far as I know, array dimensions must be const int but here they are read from the stdin with a plain scanf and it surprisingly works. Is there anything wrong with doing this?
printf("Number of rows in Matrix A: ");
printf("Number of columns in Matrix A: ");
printf("Number of columns in Matrix B: ");
// REST OF CODE