>>9,14,16
Have you tried reading the standard or at least experimenting with a compiler before sprouting nonsense? I mean, you have not, but why?
If you tried experimenting first, then you'd have discovered that this code
#include <stdio.h>
char c[50][50] = {"abc"};
int main(void)
{
printf("%p %p %p %p\n", &c, c, c[0], &c[0][0]);
printf("%08x\n", *(unsigned int*)c);
return 0;
}
prints the same value four times, then prints the hex representation of the "abc\0" (instead of some address). As do all other reasonable combinations of subscripting and addressing.
Also, only
char * cptr = c[0]; works, attempting to initialize both char* and char** with c itself results in an "initialization from an incompatible pointer type" warning.
If you now read section 6.2.5 paragraph 20 and section 6.5.2.1 of the C99 standard, you'd discover than in C
arrays are not pointers.
`char * ptr = "123"` means that somewhere an array of four chars is allocated, and
additionally a pointer to char is allocated and initialized with the address of the array. `char arr[] = "123"` does not declare a pointer anywhere, there's no place in memory where the address of arr[0] is stored. `char[4]` is stored in the same way as `struct {char _1, _2, _3, _4}` (except I'm not sure that with the same padding).
In the same vein, an array of array of chars means that its items (arrays of char) are stored contiguously and in-place (just like chars in each array of char, or like structs in a struct of structs). Then section 6.5.2.1 describes how dereferencing works, please explicitly write how a
[i][j] is interpreted and notice that there's only a single pointer dereferencing.
You apparently think that `char x[50][50]` is equivalent to `char * x[50]` with each element initialised with an address of some `char[50]` which can but are not required to be stored contiguously. This is false, there's no additional array of fifty pointers, only an array of 50 arrays of 50 chars.
Please make a habit of educating yourself before making an argument, this way you wouldn't make a fool of yourself and waste everyone's time.