A file represents a sequence of bytes on the disk where a group of related data is stored. The file is created for the permanent storage of data.
Syntax :
FILE *ptr;
ptr=fopen(“File_Name”,”Mode”);
File operation
- fopen() create a new file or open an existing file
- fclose() closes the file
- fprintf() write the set of data in the file
- fscanf() read the set of data from the file
- fputc() write a character in the file
- fgetc() read the character from a file
- fputs() write a String in the file
- fgets() read the string from a file
0 Comments