If something is declared char
it means it is an (usually) 8-bit character value.
If something is declared char*
it means it's a pointer to a char
.
If something is declared char**
it means it's a pointer to a pointer to a char
.
When you apply the *
operator to a pointer in an expression, you "dereference" is and cause the value that the pointer points to to be returned. If you apply *
more than once presumably the thing you're applying it to is a pointer to a pointer.
In the above case the char **argv
is a declaration of the argv
parameter, defining it as a pointer to a pointer to char
.
There are two other important things to understand. First, a sometype*
pointer may (or may not) be a pointer to an array of sometype
, rather than a single sometype
value. (There is no way to know if this is the case other than to examine how the pointer was set.)
Second, an array of char
values is the usual way that a "character string" is represented in C, and hence char*
often addresses a character string.
By induction, then, char**
may be a pointer to an array of pointers to character strings.