Types of standard function of file handling:-
1). fopen() function
2). fclose () function
3). feof() function
4). fseek() function
5). frewind() function
6). fscanf() function
7). f getch()
8). f put()
Define types of standard function of file handling:-
1). fopen () function:- This function is used to open a file through function open Syntex.
fp= fopen ("file name"," file-type");
2). fclose () function:- This function is used to close the file after reading and writing operation are over.
fclose (file-pointer);
3). feof () function:- This function is used to check the file pointer is at the end of file or not.
4). fseek() function:- This function allows us to read from or write to any point in the stream of bytes to opend by using the fopen() function. It more the file pointer position to the described location in the file.
fseek (fptr, offset, position);
5). frewind:- This function is used to bring the file pointer at the beginning of file.
frewind (fp);
6). fscanf():- This function read a number of value from a file. The first argument of a function is file pointer.
fscanf ( fptr, "stg", var1, var 2.-----);
7). fgetch ():- read a character.
8). fput ():- writes a character.
No comments:
Post a Comment
If you have any doubts, Please lets me know and Please Follow our Website