Saturday, 5 July 2014

r Mode r+ Mode w Mode w+ Mode a Mode a+ Mode
  1. Open the file for read mode only.
  2. File pointer places at beginning of the file.
  3. It never creates a new file if file doesn't exists & doesn't truncates content of the existed file.
  1. Open the file for read and write mode. 
  2. File pointer places at beginning  of the file.
  3. It never creates a new file if file doesn't exists & doesn't truncates content of the existed file. .
  1. Open the file for write mode. 
  2. File pointer places at beginning of the file.
  3. It creates a new file if file doesn't exists & truncates the content of file to 0 length.
  1. Open the file for  read and write mode. 
  2. File pointer places at beginning of the file.
  3. It creates a new file if file doesn't exists & truncates the content of the file to 0 length.
  1. Open the  file for  write mode only. 
  2. File pointer places at  ending of the file.
  3. It creates a new file if file doesn't exists & doesn't truncates existed file content  to 0 length.
  1. Open the file for read and write mode. 
  2. File pointer places at ending of the file.
  3. It creates a new file if file doesn't exists & doesn't truncates existed file content  to 0 length.

No comments:

Post a Comment