我需要int median(int d[], int size)
在 C 中编写一个函数来查找数组的中位数。该函数需要调用一个对该函数void selectsort(int d[], int size)
的数组进行排序的median()
函数。只median()
允许函数调用selectsort()
函数。
如果我需要使用返回类型,如何从selectsort()
to获取排序数组?我虽然关于使用指针,但这也不起作用,因为指针也需要返回。我不能嵌套在.median()
void
selectsort()
median()