title: How to use SEEK_CUR on a FILE*
body: <pre><code>offset=ftell(ptr)-sizeof(student1);
  fseek(ptr,offset,SEEK_SET);
  fwrite(&amp;student1,sizeof(student1),1,ptr);
  </code></pre>
  
  <p>This C code means move the pointer from the current position <code>ftell(ptr)</code> to start of the just read structure block. Am I right?</p>
  
  <p>If I'm right, can I use <code>SEEK_CUR</code> instead of <code>SEEK_SET</code> to go back to start of the structure block in the file?</p>
  
  <p>Please show me how to use <code>SEEK_CUR</code> and go backward to start of the structure block.</p>
  
  <p>I'm newbie to programming. So please kindly help me.</p>
  
  <p>Edit: Thank you for the answers. What I'm trying to do is to search for a keyword (Roll number of a student) and update this student's information (Name,Address,..). The updated datas are replaced the previous datas successfully. Please let me ask one more question. It there any way to insert the new data above the previous data instead of replacing it with old data?</p>