title: how to read from stdout in C
body: <p>I need to write a C program (<code>myprogram</code>) which checks output of other programs. It should basically work like this:</p>
  <pre class="lang-bash prettyprint-override"><code>./otherprogram | ./myprogram
  </code></pre>
  <p>But I could not find how to read line-by-line from <code>stdout</code> (or the pipe), and then write all this to <code>stdout</code>.</p>