[Arrays]D. Liang 6.10 Finding the index of the smallest
Description:
Write a function to return the index of the smallest element in an array of integers with the following function header:
int smallestElementIndex(int array[], int size)
Hint:
You should submit the implementation of the function but do not submit the main() function.
Programme:
//Date:2020/4/26
//Author:Kamenrider Justice
int smallestElementIndex(int array[], int size)
{
int i;
int min_index=0;
for(i=1;i<size;i++)
{
if(array[min_index]>array[i])
{
min_index=i;
}
}
return min_index;
}
Python大数据搜索