If both dimensions are unknown, you'll have to use a one-dimensional array, and do the indexing yourself:
int *ary = (int *) malloc(x * y * sizeof(int));
memset(ary, 0, x * y * sizeof(int));
int elem1_2 = ary[1 * x + 2];
int elem3_4 = ary[3 * x + 4];
and so on. You better define some macros or access functions. And free the memory after use.