Hi all I have a question about the following code and want to verify some of my assertions.
int array[] = {1,2,3,4};
int* ptr = &array[1];
Does &array[1]
mean I get the address of the array and add 1 to it, deference that address to see the actual integer and then take the address of the integer which is stored in that address?
How is this done? Is there a operator[](int index) for array that returns a reference and then we takes its address?
I want to understand what the machine is actually doing and the language semantics for this.