answersLogoWhite

0

The simplest way is usually to iterate through an array using a loop and store either the index or the value of the highest number you find.

For example:

int findLargestIndex(int *array, int arraysize)

{

int largestIndex = 0;

for(int i = 0; i < arraysize; i++)

{

if(array[i] > array[largestIndex])

largestIndex = i;

}

return largestIndex;

}

User Avatar

Wiki User

16y ago

What else can I help you with?