Foreword: The main function is often used, but I haven't paid much attention to its parameters. I encountered a problem by chance today, so I went to understand it and record it here.
main function Baidu Encyclopedia
The two formal parameters of the main function: argc is of type int, which records the number of commands and parameters, argv is a pointer to a pointer, and each pointer in the pointer array points to a string. Where argv[0] is the program name and contains the address.
In the case of the command line