Basically, char * argv[] is an array of char pointers, and char ** argv is a pointer to a char pointer.
As we pass it as a parameter to the char * argv[] function, we are set to a pointer type that points to the starting element of this array, char ** argv and are the same.
6.7.5.3 Declaration of functions (including prototypes) ...
7 Declaring a parameter as a '' type array must be adjusted to a "qualified type pointer", where type qualifiers (if any) are those that are specified in the [and] output of the array type. If the static keyword also appears inside [and] the output of the array type, then for each function call, the value of the corresponding actual argument should provide access to the first element of the array with at least as many elements as indicated by the size expression.
As you can see, we use both definitions of main , equivalent to -
int main(int argc, char ** argv)
and
int main(int argc, char *argv[])
source share