C program to open a file
C programming code to open a file and to print it contents on screen.
Download Read file program.
Output of program:
There are blank lines present at end of file. In our program we have opened only one file but you can open multiple files in a single program and in different modes as desired. File handling is very important when we wish to store data permanently on a storage device. All variables and data of program is lost when program exits so if that data is required later we need to use files.
No comments:
Post a Comment