## C pointer expression for a[i][j]

Consider we are having the array – say arr. We know that we can access the first element of an array using the a.

`int arr[] = {11,22,33,44,55,66}`
Array Element Element Accessed Element
arr Accessing first element of an array 11
arr Accessing second element of an array 22
arr Accessing third element of an array 33
arr Accessing fourth element of an array 44
arr Accessing fifth element of an array 55
arr Accessing sixth element of an array 66

Whenever we are accessing the element of an array then we are adding index in the base address of an array and using the value of operator we are fetching the value.

Array Element Equivalent pointer expression
arr *(arr+0)
arr *(arr+1)
arr *(arr+2)
arr *(arr+3)
arr *(arr+4)
arr *(arr+5)

## Equivalent Pointer Expression for a[i][j]

We can summarize the following chart using the above theory –

Array Equivalent Pointer Exp.
a[i][j] *(*(a + i)+j)
a[i][j][k] *(*(*(a + i ) +j ) +k)
a[i][j][k][l] *(*(*(*(a + i ) +j ) +k) +l)

## C Program : Pointer Expression

```#include <stdio.h>

int main()
{
int arr = {11,22,33,44,55};
int i;

for(i=0;i<5;i++) {
printf("%d ",*(arr + i));
}

return 0;
}
```