Return The Index of Highest Value – C++ Language

#include<iostream>
using namespace std;

//This is the program to return the index of highest value//
int main(int arr[], int size)
{
int max=0;
int ar[5]={2,1200,1,125,6};
for(int i=0;i<=5;i++)
{
if(ar[i]>ar[max])
max=i;
}
cout<<“max value\n”<<max;
return 0;
}