Program 202:
//Coming Soon...
Output:
Store both text file and program in same folder.Here I named text file as file123.txt
#include<stdio.h> #include<stdlib.h> main () { FILE *file; char c; file=fopen("file123.txt","r"); while(1) { if(file==NULL) { printf("File Not Found\n"); exit(0); } else { c=fgetc(file); if(c==EOF) { break; } printf("%c",c); } } fclose(file); }Explanation:
//Coming Soon...
Output:
Store both text file and program in same folder.Here I named text file as file123.txt
No comments:
Post a comment