|
If both are essentially equivalent. Isn't there still a limitation on strings2[5][21] where each one dimensional array should only be 20 characters long since the max element is 21? However *strings1[5] imposes no limitation on the length of the string since it's a point to another memory location.
Also is the following code correct?
[code]
int main(void)
{
char *strings1[5];
char strings2[5][21];
strings1[0] = "Hello"; //this will assign the beginning address of the Hello string to the first element?
strings2[0] = "Hello"; //invalid because strings2[0] is an array?
}
|