title: Reading a file in C with File Descriptor
body: <p>I want to read from a file by using its file descriptor. I can't use its name because of assignment rules.</p>
  
  <p>I obtain it by calling <code>open</code> and it works fine.  At this moment I know that I have to use the <code>read()</code> function in order to read from it. My problem is that <code>read()</code> function requires as an argument the <em>number of bytes</em> to read, and I want to read a whole line from the file each time, so I don't know how many bytes to read.  </p>
  
  <p>If i use for example <code>fscanf()</code>, it works fine with a simple string and I take back the whole line as I want. So my question is:  </p>
  
  <p>Is there any function like <code>fscanf()</code> which can be called with file descriptor and not with a file pointer?</p>