int main() {
  int full_array[3] = {1, 2, 3};
  int **result = split_array(full_array, 3);
  return 0;
}

int **split_array(const int *s, int length) {
        int **val = malloc(sizeof(int*)*2);
        int i;
        if (length % 2 == 0){
                val[0] = malloc(sizeof(int)*(length/2));
                val[1] = malloc(sizeof(int)*(length/2));
                for (i=0; i<(length/2); i+=2){
                        val[0][i] = s[i];
                        val[1][i] = s[i+1];
                }
        }

        else{
                val[0] = malloc(sizeof(int)*((length/2)+1));
                val[1] = malloc(sizeof(int)*((length/2)));
                for (i=0; i<(length/2); i+=2){
                        val[0][i] = s[i];
                        val[1][i] = s[i+1];
                }
                val[0][i-1] = s[i-1];
        }

        return val;
}
return 0