File Opening Modes in C Language
O LEVEL -PAPER 3rD -- M3-R4
C LANGUAGE
FILE OPENING MODES IN C :--
file opening modes |
READING FROM A FILE MEANS :-
Extracting data from a file to our program variables.
This will not remove data from the file.
HOW TO START PROGRAM ?
fopen in c |
Here in above example we take file pointer *fp and mode 'r' .
HOW TO CHECK IF FILE IS OPENED ?
EXAMPLE :-
WRITE A PROGRAM TO READ CONTENT FROM A FILE AND DISPLAY ON THE SCREEN.
example reading from a file |
Here in above example we used feof(), this function is used for returning true or false
(0and1)value. and used fgetc() function to read the character of a program .
I F THIS ARTICLE IS HELPFUL TO YOU THEN PLEASE LIKE AND SHARE..THANK YOU..
Comments
Post a Comment