Null-terminate string: Use '\0' or just 0?
<p>If I need to null-terminate a String, should I rather use <code>\0</code> or is a simple <code>0</code> also enough?</p>

<p>Is there any difference between using</p>

<pre><code>char a[5];
a[0] = 0;
</code></pre>

<p>and</p>

<pre><code>char a[5];
a[0] = '\0';
</code></pre>

<p>Or is <code>\0</code> just preferred to make it clear that I'm null-terminating here, but for the compiler it is the same?</p>