title: How to rewrite a particular block of file
body: <p>I want to rewrite a particular block in a file but its not working for me</p>
  
  <p>For example if I want to rewrite to offset 4 of the file I used lseek(fd,4,SEEK_SET) and called write system call but its writing at the end of the file instead of at offset 4.</p>