prog.c: In function ‘main’:
prog.c:2:14: error: ‘m’ undeclared (first use in this function)
int i, arr[m][n], j, m, n;
^
prog.c:2:14: note: each undeclared identifier is reported only once for each function it appears in
prog.c:2:17: error: ‘n’ undeclared (first use in this function)
int i, arr[m][n], j, m, n;
^
prog.c:6:3: error: implicit declaration of function ‘printf’ [-Werror=implicit-function-declaration]
printf("enter the value m");
^~~~~~
prog.c:6:3: error: incompatible implicit declaration of built-in function ‘printf’ [-Werror]
prog.c:6:3: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
prog.c:7:3: error: implicit declaration of function ‘scanf’ [-Werror=implicit-function-declaration]
scanf("%d", m);
^~~~~
prog.c:7:3: error: incompatible implicit declaration of built-in function ‘scanf’ [-Werror]
prog.c:7:3: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
prog.c:7:11: error: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Werror=format=]
scanf("%d", m);
^
prog.c:9:11: error: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Werror=format=]
scanf("%d", n);
^
prog.c:10:16: error: implicit declaration of function ‘malloc’ [-Werror=implicit-function-declaration]
ptr = (int*) malloc(m * n * 4);
^~~~~~
prog.c:10:16: error: incompatible implicit declaration of built-in function ‘malloc’ [-Werror]
prog.c:10:16: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
prog.c:2:10: error: unused variable ‘arr’ [-Werror=unused-variable]
int i, arr[m][n], j, m, n;
^~~
cc1: all warnings being treated as errors