title: "Freezing" an input line in console and printing on the lines above it?
body: <p>I was wondering if there was a way to "freeze" an input line in order to separate input and output from each other in c. For instance, my console output is currently something like this:</p>
  
  <pre><code>1 OutputLine1
  2 OutputLine2
  </code></pre>
  
  <p>But I'd like it to be something like this:</p>
  
  <pre><code>1 OutputLine1
  2 OutputLine2
  3 Enter a Command:
  </code></pre>
  
  <p>and I'd like for it to be able to change as the program receives a stream of data. So as it runs it would be something like this</p>
  
  <pre><code>1 OutputLine1
  2 OutputLine2
  3 OutputLine3
  4 Enter a Command:
  </code></pre>
  
  <p>To change to this:</p>
  
  <pre><code>1 OutputLine1
  2 OutputLine2
  3 OutputLine3
  4 OutputLine4
  5 Enter a Command:
  </code></pre>
  
  <p>I'm currently using printf() for all my output, but it doesn't seem like that would work in this situation. Are there any other printing/input libraries I can use? </p>
  
  <p>Thanks in advance!!</p>