What is the significance of the SEEK_SET, SEEK_CUR, and SEEK_END constants in file handling?

  • File attributes
  • File permissions
  • File positioning
  • File type
In file handling, the SEEK_SET, SEEK_CUR, and SEEK_END constants are used to define the reference point for file positioning. SEEK_SET sets the file position from the beginning of the file, SEEK_CUR sets it relative to the current position, and SEEK_END sets it relative to the end of the file. These constants are crucial for accurate file positioning and seeking within files.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *