I don't understand why my WRITE function (C language) doesn’t work with a character ('c')?
<p>this code works:</p>

<pre><code>void main (void)
{
    write (1, "1", 1);
}
</code></pre>

<p>this one works too:</p>

<pre><code>void putchar(char c)
{
    write (1, &amp;c, 1);   
}
void main (void)
{
    putchar('1');
}
</code></pre>

<p>but this one doesn’t :</p>

<pre><code>void main (void)
{
    write (1, '2', 1);
}
</code></pre>

<p>in the second code, c is a character (not a pointer), so why is there &amp; before c ?</p>