What is the size of the buffer that I need to define while I use fscanf? : <p>Given a file with only the following line:  </p>

<blockquote>
  <p>abc  </p>
  
  <hr>
</blockquote>

<p>The second line is empty.  </p>

<p>How can I read it with fscanf?   </p>

<p>Option 1:  </p>

<pre><code>FILE* f = fopen("f","r");
char str[3];
fscanf(f , "%s" , str); 
</code></pre>

<p>Option 2:  </p>

<pre><code>FILE* f = fopen("f","r");
char str[4];
fscanf(f , "%s" , str);
</code></pre>

<p>What is the correct way?</p>
