title: Best way to get user input for a menu-driven CLI in C
body: <p>What's the best way to get user input in a C program where the choices are of a limited number?</p>
  <p>Say for example the choices are:</p>
  <p>A) Print the list.
  B) Add 99 to the end of the list.
  C) Delete all duplicates.
  5) Reset 5 times.</p>
  <p>Entering &quot;A&quot; and then Enter is OK.
  Or, just a single keystroke would work as well.</p>