check if program argument equals a single character
<p>I want to read argument and then compare it with a character:</p>

<pre><code>int main (int argc, char *const argv[]) {
    if (argv[1][1] == 'c') {
        client();
    }
    else if (argv[1][1] == 's') {
        server();
    }

    return 0;
}
</code></pre>

<p>It works if I type <code>cc</code> or <code>dd</code>, it also works if I type <code>ccttttt</code>. It's just taking the second character, but I'd like it to work only if I type <code>c</code>.</p>