I worked with pointers and came up with a problem. So far, I know that when we create an array of any data type, then the name of the array is actually a pointer (maybe a static pointer) pointing to the very first index of the array. right?
So, I'm trying to create another pointer that may contain the address of the array name (for example, a pointer to another pointer, which in my case is the name of the array)
Example:
char name[] = "ABCD"; // name holding the address of name[0] char *ptr1 = name; // When this is possible char **ptr2 = &name; // Why not this. It give me error that cannot convert char(*)[5] to char**
I am using Code Blocks as an IDE.
source share