char c; /* c is a character */
char * pc; /* pc is a pointer to a character */
char ** ppc; /* ppc is a pointer to a pointer to a character */
/* and the following are equivalent */
char ** argv;
char * argv[];
char argv[][];
C and C++ declarations pattern: type_name list_of_declarators;
char **argv - (**argv) is a declarator. Suppose we have **argv in an expression. An asterisk sign denotes unary dereferencing operator in this context. So we have:
(*(*argv)) expression. Well, argv must be a pointer (only a pointer is a legal operand of unary * operator). Now *argv returns a pointer (for the second * operator). We have a pointer to a pointer. Look at the char type: argv must be pointer to pointer to char...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.