Uses command-line arguments - C Function

C examples for Function:main function

Description

Uses command-line arguments

Demo Code

#include <stdio.h>

int main(int argc, char *argv[])
{
     printf("Few towns in %s district:\n", *++argv);

     for(int i = 2; i < argc; i++)
          printf("%s\n", *++argv);
          //  w ww  .ja  va2  s .c  om
     return(0);
}

Related Tutorials