Is 0 a decimal or an octal?

Asked 2 years ago, Updated 2 years ago, 23 views

Is 0 a decimal or an octal? I know it's zero regardless of whether it's decimal or octal, but I'm just curious.

c++ zero octal c++표준

2022-09-22 10:17

1 Answers

In C++, 0 is an octal number

According to draft, 2014 of C++ Standard Zero is an octal number.

2.13.2 Integer literals
...
octal-literal:  
    0
    octal-literal octal-digit


2022-09-22 10:17

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.