Query regarding dynamic array

if i have a dynamic array arr ,
then arr[i] would represent the value at that index or it would be a pointer to the ith index of the array

@Parmeet-Kalsi-1631789033630118 arr[i] gives value at that index. arr+i will give address of that index.

Please mark the doubt as resolved if I have cleared your doubt.

Then in the video when our function is set to returning by reference then why we are using
return arr[i];
Not
return arr +i;

Code is saved at 17901 by bhaiya
Function is
int& operator [](int i){
return arr[i];
}

So i am asking why not
return arr +i;

@Parmeet-Kalsi-1631789033630118 arrays are sent by reference always.

I am asking about the return type

If the code would have been

int operator [](int i){
return arr[i];
}

Then this must have returned the value at the ith index of the array.

So i am asking here the code is

int& operator [](int i){
return arr[i];
}

and this is returning the address of ith index of the array as given in the video .
So i am asking if we are to return the address of ith index of array then in the above code it should be

return arr+i;
But why is it not so?

@Parmeet-Kalsi-1631789033630118 that is not the purpose of it at all, and it has nothing to do with the array being dynamic or static.
If you return arr[i] just the value will be returned. So by adding &, we can return it by reference.

This is not the same as a function argument, dont get confused between them.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.