I wanted to know difference between these

int mini=arr[i];
int miniIndex=i;
if my array is {2,3,4,5,6}
then arr[i] is whole array and miniindex is 2 right?

hey @missroy you are taking int mini as minimum value of the whole array then yes mini will store minimum value and miniindex will store index of that value.
so for the given array ar[0] will be the minimum value and miniindex will be 0
if you still you have doubt then be more specific and I will hep you out.

hey @missroy I hope that I was able to clear your doubt.If you still have any just reopen this doubt.
You can give me a rating according to you experience.