Wisdom Materials
Home
About Us
Our Clients
Careers
Services
Education
Jobs
News
Business
Health
Astrology
Entertainment
RealEstate
Devotion
Contact Us
C Programs
/ Display contents of a File C Program
Program
Click to the Copy Program
#include
#include
#include
void main() { FILE *fs; char ch; fs = fopen("abcd.txt","r"); if(fs==NULL) puts(" File doesn't exist."); while(1) { ch=fgetc(fs); if (ch==EOF) break; else putchar(ch); } } //Here File name is abcd
Input
abcd.txt
Output
Lines in File Abcd.txt
Home
Back