I think this very simple example will explain everything
Code:
#include <stdio.h>
int main(void)
{
char* a;
char* b;
char array[6];
array[0]='s';
array[1]='a';
array[2]='m';
array[3]='a';
array[4]='r';
array[5]='\0';
a = array; /*set pointer a to array*/
/* the above is equivalent to to setting pointer a to the address of the first element of the array*/
for( i = 0 ; i < 6 ; i++)
printf("%c\n",a[i]);
b = a; /*set pointer b to pointer a*/
printf("Now b\n");
for( i = 0 ; i < 6 ; i++) /* guess what this will print/*
printf("%c\n",b[i]);
return 0;
}
for better understanding of pointer just draw the memory in a paper