Home  >  Article  >  Backend Development  >  ASCII NUL, ASCII 0 ('0') and numeric literal 0?

ASCII NUL, ASCII 0 ('0') and numeric literal 0?

WBOY
WBOYforward
2023-09-09 21:21:021342browse

ASCII NUL,ASCII 0(\'0\')和数字字面值0?

这里我们将看到 ASCII NUL、ASCII 0 和 Numeric Literal 0。ASCII null 表示为 0x00,零表示为 0x30。 ASCII NUL 字符用于在 C 或 C++ 中表示字符串的结尾。当程序员使用“0”(字符 0)时,它被视为 0x30。这是一个十六进制数。十进制等效值是 48。要使用 ASCII NUL,我们必须提及“\0”而不是“0”。

char asciiNul = ‘\0’;
int zero = 0;
char zeroChar = ‘0’;

第一个是 ASCII NUL,第二个是数字 0,第三个是字符 0。

The above is the detailed content of ASCII NUL, ASCII 0 ('0') and numeric literal 0?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete