
January 22nd, 2013, 06:42 PM
|
 |
Contributing User
|
|
|
|
|
char*Array1[]={"one", "two", "three"};
"one" is a pointer to character.
"two" is a pointer to character.
"three" is a pointer to character.
{"one","two","three"} are several pointers to character.
char* is a pointer character.
char*Array1[] is space for an (memory limited) infinite number of pointers to character. Except that you nicely chose to use only 3.
How can I tell? Operator precedence.
[] evaluates before *.
Thus you could parenthesize as
char(*(Array1[]))
Array1 can be indexed, has fixed size (determined by the initializer list), and is accessed as an array. On access c gets a value of the type outside those parentheses.
Array1[0] is a pointer to character.
__________________
[code] Code tags[/code] are essential for python code!
|