First you need, for each integer, to know how many decimal digits it occupies. If you have a logarithm function at hand, let's either multiply a variable by 10
until it gets larger than the number:
int numero = 1234;
int qtosDigitos = 1;
int limite = 10;
while ( numero >= limite ) {
qtosDigitos++;
limite *= 10;
}
Then just create the array of this size, and go get the digits one by one:
int* digitos = (int*)malloc(qtosDigitos * sizeof(int));
for ( int i = 0 ; i < qtosDigitos ; i++ ) {
limite /= 10;
digitos[i] = (numero / limite) % 10;
}
Note: This solution only applies to non-negative numbers.
Now just iterate over the array and do this number by number:
int** digitosNums = (int**)malloc(tamanhoNums * sizeof(int*));
for ( int t = 0 ; t < tamanhoNums ; t++ ) {
int numero = nums[t];
... // Código acima
digitosNums[t] = digitos;
}
Note: As explained in your other question , the C language does not provide a means of dynamically finding the size of an array, so you need to save this information somewhere or use a null terminator when applicable. The above example does not do this, so be careful when adapting.