Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backslash zero delimiter '\0'

I have seen '\0' to be used as a delimiter in mixed binary files (UTF8 strings + binary data). Could anyone explain what '\0' means or point to a good place to study?

like image 284
bancer Avatar asked Jun 17 '11 00:06

bancer


People also ask

What is\ 0 delimiter?

The two-character \0 representation is used in C source code to represent the NUL character, which is the (single) character with ASCII value 0. Show activity on this post. \0 is shorthand for \000 which is an octal character escape. In general, you can shorten any octal escape that isn't followed by an octal digit.

How do you type a null character on a keyboard?

On some keyboards, one can enter a null character by holding down Ctrl and pressing @ (on US layouts just Ctrl + 2 will often work, there is no need for ⇧ Shift to get the @ sign). In documentation, the null character is sometimes represented as a single-em-width symbol containing the letters "NUL".

Does null character occupy a byte?

Note: The memory space for each character stored by NULL is 1 byte.


1 Answers

It's the null character; more info in this Wikipedia article.

like image 187
kabuko Avatar answered Nov 24 '22 00:11

kabuko