What Is The File? Explain The Modes Of Files.
3 years ago
C Programming
File:- A file is an object which stored data or information. In computer, the data used in the future we will require a file. Because the ram is volatile the data is lost but the file is stored. In a room memory and store our data for a long time.
Modes Of Files
We can use one of the following modes in the open () function.
|
Mode |
Description |
|
“r” |
Open for reading. If the file does not exist, fopen() returns null. |
|
“RB” |
Open for writing. If the file does not exist, fopen() returns null. |
|
“w” |
Open for writing. If the file exists, the content will be overwritten. |
|
“wb” |
Open for writing in binary. If the file exists, the content will be overwritten. |
|
“a” |
O pen forappendd. If the file does not exist, it will be return created. |
Rusma Khadka
Dec 27, 2022