title: Can you parse sentences with `scanf` and detect newlines?
body: <p>I  know how <code>scanf</code> could be used for parsing sentences into single words:</p>
  
  <pre><code>while(1){
      scanf("%s", buffer)
      ...
  }
  </code></pre>
  
  <p>However, if I enter a sentence like <code>one two three&lt;return&gt;</code>, how can I find out inside a while-loop if the word I'm getting in the buffer is the one before I pressed <code>&lt;return&gt;</code>?</p>
  
  <p>I guess it is hardly possible with <code>scanf</code>, but maybe there is a similar function?</p>