Home > Backend Development > C++ > body text

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

WBOY
Release: 2023-09-09 21:21:02
forward
1341 people have browsed it

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’;
Copy after login

第一个是 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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!