c language acquisition parameters of the command line in main

#include<stdio.h>
#include<iostream>

int main(int argc,char *argv[]) {
    the printf ( " number of parameters are (including the name of the current 0th executable files):% D \ n- " , argc);
     // parameter list pointer strings 
    the while (* the argv)
    {
        puts(*argv++);
    }  
    system("pause");
    return 0;
}

Output:

Guess you like

Origin www.cnblogs.com/xiximayou/p/12128441.html