3 ms·
An octal-escape-sequence is a backslash followed by 1, 2, or 3 octal digits. '\0' is just another octal escape sequence, not a special-case syntax for the null
by _kst_ 3y ago
An octal-escape-sequence is a backslash followed by 1, 2, or 3 octal digits.
'\0' is just another octal escape sequence, not a special-case syntax for the null character.
"\0", "\00", and "\000" all represent the same value; "\0000" is a string literal containing a null character followed by the digit '0'.
Hexadecimal escape sequences can be arbitrarily long. If you need a string containing character 0x12 followed by the digit '3', you can write "\x12" "3".
- chrishill89 3y agoThanks, that makes sense. :)