File Handling in C || C Programming

File Handling in C



File Handling means storing various data in a file with the help of programming Language. In C programming language, File handling is the concept which helps us to create, manipulate and play with the files.we can also extract/fetch data from a file to work with it in the program.

There are various functions which can be performed with the help of File Handling, some of them are :-

  • Creating a new file
  • Opening an existing file
  • Reading data from an existing file
  • Writing data to a file
  • Moving data to a specific location on the file

  • Closing the file

Let’s have a look on the basic functions used in File Handling in C:-

fopen() :- This function is used to open a new or existing file.

fprintf() :- This function is used to write something into the file.

fscanf() :- This function is used to read data / something from a file.

fputc() :- This function is used write a character into a file.

fgetc() :- This function is used to get / read a character from the file.

fputw() :- This function is used to write an integer value to a file.

fgetw() :- This function is used to read / get an integer data / value from a file.

fclose() :- This function is used to close a file.


#ENJOY CODING

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post