int main(int argc,char *argv[]) argc 参数个数 argv 参数字符串数组 第一个参数为 程序路径及名称#include int main(int argc,char *argv[]){ printf("argc=%d\n",argc); for (int i=0;i ./a.out a b c argc=4 argv[0]=./a.out argv[1]=a argv[2]=b argv[3]=c ./a.out 'a b c' argc=2 argv[0]=./a.out argv[1]=a b c ./a.out "a b c" argc=2 argv[0]=./a.out argv[1]=a b c