i am clear with the concept of Array of pointers & pointer to an Array.
but i wonder what is the advantage of creating a pointer to an array
though the same can be done just by using twod array with row and col indexes.
please some let provide me some info and advantages of pointer to an array.
what is the the different between these below statements: printf("%c", ptr[0][1]);
printf("%c",ptp[0][1]);
they access the same value using same notation.
int main()
{
char str[4][10]= {"Alex","Sue","Brev","Prin"};
char (*ptr)[10] = str ;
char *ptp[] = {"Alex","Sue","Brev","Prin"};
printf("%c", ptr[0][1]);
printf("%c",ptp[0][1]);
return 0;
}
Thanks