title: Running external command with user input in C
body: <p>I want to show the output of the Linux command <code>dialog --menu</code> from my C program so that the user can select an option from the menu.  Also, the last line of output from the program is the option the user selected, so I need to capture that.</p>
  
  <p>I've tried using <code>popen()</code> and <code>system()</code> to accomplish this, and looked on the web, but couldn't find anything that led to a successful result.</p>
  
  <p>If I can't find a way to use <code>dialog</code>, I will have to use a much simpler approach (a simple "Type your choice and press enter") and it won't be as cool.</p>
  
  <p>Thank you in advance,
  Brian</p>