Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void displayInfo()
- {
- FILE *file;
- file = fopen("d://information.txt","r");
- char eachLine[200];
- if(file== NULL )
- {
- printf("Error Opening The required file\n\nThe Program will exit now");
- exit(0);//exit function called from stdlib.h
- }
- while(!feof(file))
- {
- fgets(eachLine,200,file);
- printf("%s",eachLine);
- }
- fclose(file);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement