Ba careful with your index:
int MAX_INT(int arr[],int s)
{
int i=0;
Max=arr[i];
while(i<s)
{
if(Max>arr[i+1])
{
}
i++;
}
}
I suggest this:
int MAX_INT(int arr[], int s)
{
if (s <= 0)
return -1;
int maxIndex = 0;
int maxValue = arr[0];
for (int i = 1; i < s; i++)
{
if (arr[i] > maxValue)
{
maxValue = arr[i];
maxIndex = i;
}
}
return maxIndex;
}