0
1.1kviews
What is file? Explain various file handling operations in C
1 Answer
0
8views
  1. A file represents a sequence of bytes on the disk where a group of related data is stored. File is created for permanent storage of data.
  2. In C language, we use a structure pointer of file type to declare a file. FILE *fp;
  3. C provides a number of functions that helps to perform basic file operations.
  4. Following are the functions.
    1. fopen(): This command is used to open a particular file.
    2. fclose(fptr): This command is used to close a file.
    3. getc (): Used to read from the file.(SingleCharacter)
    4. putc(): Used to write into the file. (SingleCharacter)
    5. fprinf(): write multiple data to file.
Please log in to add an answer.