1which library is used for file handling operations
stdio.h
2use of fopen() and what does it return
it is used to open a file and it returns a pointer to the file
3which function is used to close a file
fclose()
4which function is ised to read from a file
fread()
5use of fseek()
it is used to set the file position to a specified position.
6use of feof()
It is used to check whether the end of the file is reached or not.
7use of ftell()
It is used to get the current file position.
8use of ferror()
It is used to check whether an error occurred during file operation or not.
9use of remove()
It is used to delete a file.
10use of rename()
It is used to rename a file.
11what does the modes do in file
determines where the file is positioned when opeaned and what functions are allowed
e.g after you close a file you can reopean the file in different mode depending upon what you are doing e.g reading , writing or doing both simaltaneously in a file
12what does this mode does in files "r":
Opens a file for reading. The file must exist.
13what does this mode does in files "w"
Creates a file for writing. If the file already exists, it is truncated to zero length.
14what does this mode does in files"a"
Appends to a file. Writing operations are always performed at the end of the file, regardless of the current file position.
15what does this mode does in files "r+"
Opens a file for both reading and writing. The file must exist.
16what does this mode does in files w+
Creates a file for both reading and writing. If the file already exists, it is truncated to zero length.
17what does this mode does in files a+"
Opens a file for both reading and appending. Writing operations are always performed at the end of the file, regardless of the current file position.