I am unable to understand how char *argv[] is similar to char **argv. Also please let me know when to use pointers?
A function parameter declared as having array type is silently adjusted to having pointer type. Thus, if you declare a function with a parameter of type int x[]
, the parameter actually has type int *x
. Similarly, char *argv[]
in a function parameter is the same as char **argv
as the array of pointers is adjusted to a pointer to pointer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With