'\0' evaluates false, "\0" evaluates true
<p>Inspired by a program described in <em>K&amp;R</em> section 5.5:</p>

<pre><code>void strcpy(char *s, char *t)
{
    while(*s++ = *t++);
}
</code></pre>

<p>C program</p>

<pre><code>if ('\0') { printf("\'\\0\' -&gt; true \n"); }
else      { printf("\'\\0\' -&gt; false\n"); }

if ("\0") { printf("\"\\0\" -&gt; true \n"); }
else      { printf("\"\\0\" -&gt; false\n"); }
</code></pre>

<p>prints</p>

<pre><code>'\0' -&gt; false
"\0" -&gt; true
</code></pre>

<p>Why do <code>'\0'</code> and <code>"\0"</code> evaluate differently in C?</p>

<blockquote>
  <p>clang version 3.8.0</p>
</blockquote>