# Arrays and Pointers

An array's identifier (name or label) is actually a pointer to the first element of an array. That is myArray === &myArray  (or even &myArray ). The only difference is that the array name is a constant pointer (cannot change the location it points at).

int myArray = {1, 2, 3, 4, 5} ;

The address of the first element is: &myArray

Therefore &myArray is the same as myArray, as are their addresses

The value in &myArray is myArray, and the value in myArray is *myArray, and therefore myArray is the same as *myArray

```&myArray === (myArray+1)  AND, myArray === *(myArray+1)
&myArray === (myArray+2)  AND, myArray === *(myArray+2)
&myArray === (myArray+1)  AND, myArray === *(myArray+3)
.
.
&myArray[i] === (myArray+i)  AND, myArray[i] === *(myArray+i)```

```#include <stdio.h>

int main ()
{
int myArray = {98, 82, 73, 57, 65, 76, 44};

int i = 0 ;

for( i = 0; i < 7 ; i++ )
{

printf("The address of myArray element %d is: %d \n", i, &myArray[i] );
printf("The address of myArray element %d is: %d \n", i, (myArray + i) );

printf("The value in myArray element %d is: %d \n", i, myArray[i] );
printf("The value in myArray element %d is: %d \n\n", i, *(myArray + i) );

}

return 0;
}```