int **split_array(const int *s, int length) {
  int num_evens;
  int num_odds = length / 2;

  if (length % 2 == 0){
    num_evens = length / 2;
  } else{
    num_evens = (length / 2) + 1;
  }

  int *array1 = malloc(sizeof(int) * num_evens);
  int *array2 = malloc(sizeof(int) * num_odds);
  int count1 = 0;
  int count2 = 0;

  for (int i = 0; i < length; i++){
    if (i % 2 == 0){
      array1[count1] = s[i];
      count1 = count1 + 1;
    } else{
      array2[count2] = s[i];
      count2 = count2 + 1;
    }
  }

  int **arrays_ptr = malloc(sizeof(int *) * 2);

  // Not stored in heap since itself is not, but it consists of 2 dynamically allocatted arrays of ints
  //int *arrays_ptr[2];

  arrays_ptr[0] = array1;
  arrays_ptr[1] = array2;

  return arrays_ptr;
}
is s being changed?