Monday 27 August 2012

C command line program code using argv if -else loop

C command line program code using argv if -else loop
#include<stdio.h>
#include<conio.h>
void main(int argc,char*argv[])
{
 FILE *fp;
 char s[100];
 clrscr();
 printf("\nNumber of argument on command line =%d\n",argc);
 if(argc<2)
 {
 printf("forget the file name\n");
  }
 else
 {
  printf("\nNo parameter on the command line");
  }
  getch();
 }
Examples for C command line program code using argv if -else loop
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: