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
rReadOpen file in read mode.
wWriteOpen or creates file(if not exist) in write mode and erase old content of file.
r+read + writefor reading and writing, create file(if not exist),  overwrite old data
w+read + writeOpens or creates file in write mode.
a+read + append Opens file in append mode.
rbread in binary mode Open for reading in binary mode.
wbwrite in binary modeOpen file for writing in binary mode.
abappend in binary modeOpen 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