c代码片段-注解

#include<stdio.h>

/*
 *  int ac 是命令行参数的个数 第一个参数是当前文件地址
 *  char * arg[]  字符指针的数组, 每一个指针指向一个具体的命令行参数(字符串))
 */

 //命令: ./test.out 1

int main(int ac,char * arg[])
{
    //printf("%d",ac);   //2 
    
    for (int i=0;i<ac;i++)
    {
        printf("%s
",arg[i]);
        /*
        ./test.out
        4
        */
        
    }

}
原文地址:https://www.cnblogs.com/loveyouyou616/p/7772499.html