Original Post
Hi to everyone and happy new year. I'm studying C at the moment and try to wipe out all my questions about pointers. Say we have the following piece of code.
char **array1;
char *array2[5];
array1 = malloc(5 * sizeof(char));
array1[0] = "blabla";
array1[1] = "more blabla";
...
array2[0] = "even more babbling";
...etc.
Is there any difference in the memory layout of the two variables? Are they accessed the same way? I mean the expression
*(*(array + 1))
*(*(array1 + 1))
accesses the 1st character of the second row in both arrays. Do you know any resource where I could read more about pointer arrays and multidimensional pointers? Thanks for your time :)