title: Best way to store command line arguments in C
body: <p>I tend to use either <code>getopt()</code> or <code>getopt_long</code> to parse command-line arguments when working with console-based programs. However, most of the time I end up using global variables to store configuration parameters that I can use across all <code>*.c</code> files. </p>
  
  <p>So I'm interested to know what patterns do you use, and what would be a better alternative to global variables.</p>