Search



Thursday, 20 August 2015

Methods to Open File,


  • The second argument of fopen is the mode in which we open the file.   
  • "r" opens a file for reading.
  • “r+” opens a file for both reading & writing.
  • "w" opens a file for writing - (deletes the existing file of same name).
  • “w+” for both reading & writing.
  • "a" opens a file for appending - writing on the end of the file.
  • “a+” for both reading & appending.

No comments:

Post a Comment

Guys if you think something is wrong or should be edit than please do comment.