 <p>It doesn't matter how you pass the arguments to below,</p> <pre><code>while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuVv?wxl", longopts, &amp;lop)) != EOF) switch (i) { ... case 'a': flag_all++; break; case 'n': flag_not |= FLAG_NUM; break; ... </code></pre> <p>Just the cases <code>a</code> &amp; <code>n</code> are enabled which is processed later with the respective flags set. </p>