int *build_array(char **strs, int size) {
    int *test;
    test = malloc(sizeof(int) * size);
    for (int i = 0; i < size; i ++){
        test[i] = strtol(*strs, strs, 10);
    }
    return test;
}

main(int argc, char **argv){
    int *full_array = build_array(&ar[1], argc - 1);
    
    return 0;
}
This code is supposed to set full_array to an integer array made of the string values inputted from command line.