Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

#include<stdio.

h>
#include<conio.h>

int main(int argc,char *argv[])


{
FILE *f1;
char c;
clrscr();
if(argc!=2)
{
printf("\nError in no. of arguments");
getch();
exit(1);
}
else
{
f1=fopen(argv[1],"r");
while((c=getc(f1))!=EOF)
putchar(c);
}
getch();
return 0;

You might also like