I created ptr as pointer to an array of 5 chars.
char (*ptr)[5];
assigned it the address of a char array.
char arr[5] = {'a','b','c','d','e'};
ptr = &arr;
using pointer ptr can I access the char values in this array?
printf("\nvalue:%c", *(ptr+0));
It does not print the value.
In my understanding ptr will contain the base address of array but it actually point to the memory required for the complete array (i.e 5 chars). Thus when ptr is incremented it moves ahead by sizeof(char)*5 bytes. So is it not possible to access values of the array using this pointer to array?