Why does printf function ignore the latter \0? : <p>I am stuck with some features that \0 has.</p>

<p>I know that \0 is a null character and it is a term to indicate that the formal is a string. </p>

<pre><code>int j;

j = printf("abcdef\0abcdefg\0");

printf("%d", j);

return 0;
</code></pre>

<p>When I tried to print "abcdef\0abcdefg\0" out, C would only print string 'abcdef' and '6' instead of both 'abcdef' and 'abcdefg' which would sum up to 13. Why does this happen?</p>
