trying to turn int into array of int, but it doesn't seem to be working
int populate_array(int sin, int *sin_array) {
    for(int i = 8; i >= 0; i--){
        if(sin == 0){
            return 1;
        }
        else{
            sin_array[i] = sin%10;
            sin = sin/10;
        }
    }
    return 0;
}