read a document from console in c

Solutions on MaxInterview for read a document from console in c by the best coders in the world

showing results for - "read a document from console in c"
Khalil
18 Apr 2019
1#include<stdio.h>
2int main(int argc,char *argv[]){
3	FILE *in=fopen(*++argv,"r");
4	char c;
5	while((c=fgetc(in))!=EOF)
6		putchar(c);
7	fclose(in);
8	return 0;
9}