C file programs using array command line
#include<stdio.h>
#include<conio.h>
void main(int argc,char*argv[])
{
FILE *filep;
int i;
clrscr();
printf("\nNumber of argument on command line =%d\n",argc);
if(!argc<2)
{
printf("Arguments on the command line:\n");
for(i=0;i<=argc;i++)
printf("argv[%d]=%s\n",i,argv[i]);
}
else
{
printf("\nNo parameter on the command line");
}
getch();
}
programming code for C file programs using array command line
#include<stdio.h>
#include<conio.h>
void main(int argc,char*argv[])
{
FILE *filep;
int i;
clrscr();
printf("\nNumber of argument on command line =%d\n",argc);
if(!argc<2)
{
printf("Arguments on the command line:\n");
for(i=0;i<=argc;i++)
printf("argv[%d]=%s\n",i,argv[i]);
}
else
{
printf("\nNo parameter on the command line");
}
getch();
}
programming code for C file programs using array command line
0 comments: