`argv' (whether declared as **argv, *argv[] or argv[][]) is a pointer to an array of pointers. The easiest way to understand this is to swap from array notation to pointer arithmetic notation (making no functional difference, but easier to understand). So, if a variable is declared as `char **ptrptr' and contains ``adad asdasd adasd'', then `*(ptrptr + 0) == adad', `*(ptrptr + 1) == asdasd' and `*(ptrptr + 2) == adasd'. There is a convention (which argv follows) to then make the next entry null to signify the end of the list of pointers. To further clarify, our memory might end up like this:-
Code:
[cjc@locked ~]$ ./tmp this
argv+0 : 0x5f914ce4
*(argv+0): 0x5f914ddf, ./tmp
**(argv+0): 0x2e, .
*(argv+1): 0x5f914de5, this
**(argv+1): 0x74, t
*(argv+2): (nil)
EDIT: sorry if you read the previous version of this post, I typed quite a lot and made a slight mistake. It is corrected now. Also, I thought of a much more simple way to describe it =).