int **split_array(const int *s, int length) {
  int *result_array[2];
  int counter1 = 0;
  int counter2 = 0; 
  // determine how much memory for array 1 and 2 
  if (length % 2 == 0){
    result_array[0] = malloc(sizeof(int) * (length / 2)); 
    result_array[1] = malloc(sizeof(int) * (length / 2));
  } 
  // if even there are half even numbers, if odd there are n - 1 / 2 
  else {
      result_array[0] = malloc(sizeof(int) * (((length - 1) / 2) + 1));  
      result_array[1] = malloc(sizeof(int) * ((length - 1) / 2));
  }
  for (int i = 0; i < length; i++) {
    if ( (i + 1) % 2 != 0) {
      result_array[0][counter1] = s[i];
      counter1 += 1;
    }
    else {
      result_array[1][counter2] = s[i];
      counter2 += 1;
    }
  }
  return &result_array;


}
 Return a pointer to an array of two dynamically allocated arrays of ints.
   The first array contains the elements of the input array s that are
   at even indices.  The second array contains the elements of the input
   array s that are at odd indices.