int i = 3;
int j = 2;
int** a = malloc(i * sizeof(int*));
for (unsigned int k = 0; k < i; k++) {
a[k] = malloc(j * sizeof(int));
}
// Now you can use it.
a[0][0] = 0;
a[2][1] = 3;
Haven't you tried searching the SO question database before asking the question?