int* myPointer = new int[100];
// ...
int firstValue = *(myPointer + 0);
int secondValue = myPointer[1];
Is there any functional difference betwe
Actually , When an Array 'a' is initialized a pointer to its first memory location ie.. a[0] is returned which is nothing but a ;
So if you do 'a+1' it is actually a pointer to a[1]
if you do 'a+2' it is actually a pointer to a[2]
if you do 'a+3' it is actually a pointer to a[3] so on ,
so if you do *(a+1) you will get value of a[1] and similar for other values also. if you do *(a) you actually get a[0], So i think its pretty clear now how it works..