FILE MODES IN C
In C language, file modes are used to specifies the purpose for opening a file.
There are different types of file modes, which are described below.
FILE MODE
|
DESCRIPTION
|
r
|
To opens a text file in reading mode
|
w
|
To opens or create a text file in writing mode.
|
a
|
To opens a text file in append mode
|
r+
|
To opens a text file in both reading and writing mode
|
w+
|
To opens a text file in both reading and writing mode
|
a+
|
To opens a text file in both reading and writing mode
|
rb
|
To opens a binary file in reading mode
|
wb
|
To opens or create a binary file in writing mode
|
ab
|
To opens a binary file in append mode
|
rb+
|
To opens a binary file in both reading and writing mode
|
wb+
|
To opens a binary file in both reading and writing mode
|
ab+
|
To opens a binary file in both reading and writing mode
|
0 Comments