title: Does fscanf allocate memory and place a NUL byte at the end of a string?
body: <p>If I am correct, doing something like:</p>
  
  <pre><code>char *line;
  </code></pre>
  
  <p>Then I must allocate some memory and assign it to line, is that right? If I am right, the question is the following:</p>
  
  <p>In a line like </p>
  
  <pre><code>while (fscanf(fp,"%[^\n]", line) == 1) { ... } 
  </code></pre>
  
  <p>without assigning any memory to line I am still getting the correct lines and the correct strlen counts on such lines.</p>
  
  <p>So, does <code>fscanf</code> assign that memory for me and it also places the <code>'\0'</code>?
  I saw no mention about these 2 things on the spec for <code>fscanf</code>.</p>