#include <stdio.h>
#include <stdlib.h>

int t_populate_array(int sin, int *sin_array) {
    for (int i = 8; -1 < i; i--){
        sin_array[i] = sin % 10;
        if(sin == 0){
            return 1;
        }
        sin = sin / 10;
    }
    return 0;
}

int main() {
    int sin_arrayy[9];
    int sin = 999999999;
    int valid = t_populate_array(sin, sin_arrayy);
    for (int i = 0; i < 9; i++){
        printf("%d \n", sin_arrayy[i]);
    }
    printf("Valid: %d \n", valid);

    return 0;
}
Populate the empty integer array in a helper function, and return whether the given int was 9 digits long. In the main function print the digits in the now populated array and whether the given number was 9 digits long by either printing 0 or 1