108k views
2 votes
Write only the header of a function named findhighestindex that takes as input, two parameters an array of double and an integer variable containing the size of the array the function returns the index of the largest element in the array g

User Prakash S
by
4.8k points

1 Answer

3 votes
Please specify the language you're using; here it is in Java:

public int findHighestIndex(double[] arr, int arrSize)

However it must be said - this implementation is poor. You you shouldn't need to pass the size of the array, this can be done using a suitable method/attribute, depending on the language (arr.length, in Java).
User Raptor
by
5.3k points