About command line arguments of main function

后端 未结 4 1360
暗喜
暗喜 2020-12-19 07:44

It will look like int main(int argc, char *argv[]);. My questions are:

1 How many array items can I add in argv[]?

2 What is MAX si

4条回答
  •  醉话见心
    2020-12-19 08:48

    Both of those are bounded only by how much memory you have (or how much memory your OS gives your program).

    EDIT: Actually, the number of arguments is also bounded by the size of int.

提交回复
热议问题