Multiple choice technology programming languages

The correct set of sequence for file operations for a file say 'test'

  1. lseek(), open(), write(), close()

  2. open(), write(), lseek(), close()

  3. open(), lseek(), open(), , write() close()

  4. None

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To perform file operations, a file must first be opened using open(). Once open, you can write data to it using write(), reposition the file offset using lseek(), and finally release the file descriptor using close().