\0 is the
C escape sequence for a
string terminator.
To further clarify here, a
character array is really just a list of numbers representing characters in
ASCII. For instance, '32' is a space. In C, a string's end is marked by assigning that character position the value 0. '\0' is, as XCthulhu
noted, an
escape sequence.
char c = '\0';
and
char c = 0;
are totaly equivalent in every way. \0 does
NOT insert a "
\", then a "
0" into the
character stream. You need the extra spot for the zero-value, not because you're also inserting a
slash.
Also, null is not the default content of a memory address of an
unassigned pointer. Null is equivalent to zero, while unassigned, non-zeroed memory is considered
random. It isn't, of course. For instance, you see far more
zeroes than you would in
random distribution, which probably accounts for
XCthulhu's 'every fourth character' thing (no
OS, to my knoweldge, randomly zeroes
unallocated memory for no specific reason).