Create a file using file handling in c

Create a file using file handling in c

In the program, you will get an example code to create a file using file handling in c. This is a simple program of files in c programming language, to create a file.

File Handling in C

File Handling in C is the way to storing of data in a file using c programming.  In C programming language, we can store data/results in a file through the program of file handling in C. Thereafter whenever we required, we can extract data from the file.

file handling in c

File modes used in File Handling in C

Meaning  Description
r Read Open file in read mode.
w Write Open or creates file(if not exist) in write mode and erase old content of file.
r+ read + write for reading and writing, create file(if not exist),  overwrite old data
w+ read + write Opens or creates file in write mode.
a+ read + append  Opens file in append mode.
rb read in binary mode Open for reading in binary mode.
wb write in binary mode Open file for writing in binary mode.
ab append in binary mode Open for append in binary mode

File Handling in C program


Create a file using file handling in c



Check out our other C programming Examples





Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top