I'm coding a C program that asks the user to input two variables that represent the 2d array sizes and then print the array, I don't know where the problem is! any help?
`#include <stdio.h>
int main(void) {
int n, x, i, j;
int arr[n][x];
printf("Enter no of columns:");
scanf("%d", &n);
printf("Enter no of rows:");
scanf( "%d", &x);
printf("Enter elements: \n");
for (i = 0; i < n; i++)
for (j = 0; j < x; j++)
scanf("%d", &arr[i][j]);
for (i = 0; i < n; i++){
for (j = 0; j < x; j++)
printf("%d \t", arr[i][j]);
printf("\n");
}
return 0;```
}``