It is necessary to write a program that reads a two-dimensional array from a file, the name of which is entered into the console from the keyboard, and outputting the read array to the screen. Help me find a bug
int main(int argc, char* argv[]) { int i, j; FILE *in = fopen(argv[1], "rt"); if ((in) == NULL) { printf("Cannot open file.\n"); } for (i = 0; i < N; i++) { for (j = 0; j < N; j++) { fscanf(in, "%d", &A[i][j]); printf("%d ", A[i][j]); } printf("\n"); } getchar(); return(0); }PS Issue resolved
A[][]in the question). - avp