You know what ??
If a compiler gives an output of `9` for the input `011`, it’s likely interpreting `011` as an octal (base 8) number rather than a decimal…
Wiki topics:
💻 · Programming
You know what ?? If you input any number starting with zero in compiler , it will results as octal number…
If a compiler gives an output of 9 for the input 011, it’s likely interpreting 011 as an octal (base 8) number rather than a decimal (base 10) number.
Explanation:
- In many programming languages (like C, C++, and JavaScript), a number that starts with
0is interpreted as octal. - The octal number system (base 8) uses digits from
0to7, meaning011in octal needs to be converted to decimal. ie 18¹ + 18⁰ = 9
Would you like more clarification?
메타데이터
- post_id
- ace5c09deb8e
- slug
- you-know-what-ace5c09deb8e
- url
- https://medium.com/@kuchnhinoname/you-know-what-ace5c09deb8e
- canonical_url
- https://medium.com/@kuchnhinoname/you-know-what-ace5c09deb8e
- author_url
- https://medium.com/@kuchnhinoname
- status
- ok
- fetched_at
- 2026-07-20 22:19:23