Question: I have done type casting with `int` and `char` but not with pointers so I posted this question.

```
#include <stdio.h>
int main() {
    int a[4] = { 1, 2, 6, 4 };
    char *p;
    p = (char *)a;   // what does this statement mean?
    printf("%d\n",*p);
    p = p + 1;        
    printf("%d",*p);  // after incrementing it gives 0 why?
}

```

The first call to `printf` gives the first element of the array. And after `p=p+1` it gives `0`. Why?

Answer: 
To be exact, the first `printf` doesn't give the first element of the array, it gives the first **8 bits** of first element, which just happens to be equal to the first elements numeric value.
The second printf gives the next 8 bits of first element, which is 0 in this case.

**1 = 00000000 00000000 00000000 00000001 (32 bits)**
If you use an intel like processor the bytes on the stack are stored using the little endian format. In more, probably the type int (on your computer) has size 4 bytes while char is 1 byte long (you can verify this using the c operator 'sizeof'), so the first element of your integer array is:

```
0x04 0x00 0x00 0x00

```

For this reason when you use a char pointer to see the values of your integer array, you proceed forward one bytes at time (not 4) with the obvious result you've obtained.

I hope this helps!