What does char **ch mean?
Doug Gwyn
gwyn at smoke.brl.mil
Tue May 7 06:52:53 AEST 1991
In article <1991May4.062007.3264 at weyrich.UUCP> orville at weyrich.UUCP (Orville R. Weyrich) writes:
>I am studying for a C language exam, and a study guide I am using states
>that the declaration char **ch; is equivalent to char *ch;
No, they're not at all equivalent. They might not even have the same size.
>I am having difficulty understanding this. My interpretation of the
>declaration char **ch is that we have a pointer to a pointer to a char.
Correct.
>I think that this would be equivalent to the declaration char *ch[]
>rather than what the study guide says.
The only place where char**ch and char*ch[] are equivalent is as a
declaration of a function parameter.
More information about the Comp.lang.c
mailing list