For dynamic arrays, we retrieve the last element of the vector and return its memory address.For static arrays, we simply retrieve the memory address of its last element.
More DetailsFor dynamic arrays, we evaluate std::vector::size(), substact one, get the `result`th element of the vector and then set the pointer to its memory address. (&vector_name[vector_name.size() - 1])
For static arrays, we get the last value of the array and set the pointer to its memory address. (&(*array_name)[last_element_number])