1 What are the errors you can expect or forsee occurring whe
1) What are the errors you can expect or forsee occurring when attempting to open a file for reading and writing?
2) What is proper procedure when you are done working with a text file input in C? What should you do with the pointer to the file at the end of the program?
Solution
1).
FileAccessDenied = if this error occured in your program you Cannot access file. The file is locked or in use. Another process is using the file. Antivirus software may mistakenly quarantine a file, or a backup process may temporarily deny access. A flat file backup system or antivirus software may be running against the database or the check file directories. This error can also occur if the permissions on the folder that contain the files for the information stores are not sufficient for the stores to function properly.
errDiskIO = Disk IO error. it r is a generic error that appears whenever a disk I/O problem prevents Exchange from gaining access to a requested page in the database or to a check file. A disk or controller failure may have occurred, and access to the entire drive has been lost, sometimes temporarily, which may be caused by a drive failure.
2.)
following are the steps that every programmer follow to work with text files.
step1:create a file pointer to store file address means path.
step1:fopen() is the predefined function to open textfiles.
step3:work on file and after all the work finish you need to close the file.
with the file pointer we used to close the file
