What is the type of command-line argument `argv` in C?

前端 未结 6 1009
广开言路
广开言路 2020-12-28 17:45

I\'m reading a section from C Primer Plus about command-line argument argv and I\'m having difficulty understanding this sentence.

It says that,

6条回答
  •  Happy的楠姐
    2020-12-28 17:59

    Yes.

    The type of argv is char**, i.e. a pointer to pointer to char. Basically, if you consider a char* to be a string, then argv is a pointer to an array of strings.

提交回复
热议问题