title: C: Reading an optional input from console
body: <p>The user may use 2 commands:</p>
  
  <pre><code>move black
  </code></pre>
  
  <p>(or)</p>
  
  <pre><code>move
  </code></pre>
  
  <p>So the 'black' part is optional.</p>
  
  <p>I know that the user input is confined to 50 characters top, so I can use <code>scanf()</code> to read each string by itself.</p>
  
  <p>However, I cannot use 3 times <code>scanf()</code> as for the second option - there will be an error (I think ..).</p>
  
  <p>Is there a function that allows me to read and if there's no input it will inform that? </p>
  
  <p>Is gets (or fgets) an appropriate one? (remember thaat the line is no longer than 50 characters).</p>