What is command line argument?

Getting the arguments from command prompt in c is known as command line arguments.  In c main function has three arguments.
 
(a) Argument counter
 
(b) Argument vector
 
(c) Environment vector
 
For example:-
 
void main(int argc,char *argv[],char *env[]){
    int i;
    for(i=1;i<argc;i++){
         printf("%s\n",argv[i]);
    }
}

Comments

Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity

Customize User's Profile in ASP.NET Identity System

Lambda two tables and three tables inner join code samples