title: What are the arguments to ftruncate()?
body: <p>I am trying to use the function <code>ftruncate()</code> to truncate a file.</p>
  
  <p>I know from looking online that it goes like this:</p>
  
  <pre><code>int ftruncate(int fildes, off_t length);
  </code></pre>
  
  <p>But I don't know what to supply for the arguments <code>int fd</code> and <code>off_t length</code>.</p>