Even in any number of input systems, 0 has only one value, that is, "zero". The reason for asking this question is purely idle.
He recently discussed the topic about data with his friends. He said that eight-digit data has almost never been used. I can't refute it for a moment. Indeed, apart from the commonly used decimal system, binary and hexadecimal are the most used in the computer, and the octal number is really "niche ".
When I got home, I thought over it. gossip, gossip, "gossip is a number starting with 0." Isn't that 0? 0 is also a number starting with 0! If 0 is octal, we use the octal number almost every day. There are indeed a lot of things worth exploring in the computer. For example, the simple type is actually not simple at all. For more computer problems, go to my 《CodeThe mystery series.
Is 0 an octal number? How are c ++ specifications defined?
Yes. In C ++, 0 is octal.
According to C ++ standards:
2.14.2 integer [Lex. Icon]
Integer-literal:
Decimal-literal integer-suffixopt
Octal-literal integer-suffixopt
Hexadecimal-literal integer-suffixopt
Decimal-literal:
Nonzero-digit
Decimal-literal Digit
Octal-literal:
0 <-------------------- Octal-literal octal-digit
In the future, we can proudly say, "octal in computers is more common than binary or even hexadecimal ".