

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What does it mean when a numeric constant in C/C++ is prefixed with a 0?
Sometimes we may see some numeric literals, which is prefixed with 0. This indicates that the number is octal number. So octal literals contain 0 at the beginning. For example, if an octal number is 25, then we have to write 025.
Example
#include <stdio.h> int main() { int a = 025; int b = 063; printf("Decimal of 25(Octal) is %d\n", a); printf("Decimal of 63(Octal) is %d\n", b); }
Output
Decimal of 25(Octal) is 21 Decimal of 63(Octal) is 51
- Related Questions & Answers
- What is a lunar eclipse? When does it occur?
- What does “javascript:void(0)” mean?
- What does “unsigned” in MySQL mean and when to use it?
- What do you mean by pointer to a constant in C language?
- What does the operation c=a+++b mean in C/C++?
- What is a psychometric test? When is it conducted?
- What does “dereferencing” a pointer mean in C/C++?
- "Makkal Needhi Maiam" what does it mean?
- What does it mean by select 1 from MySQL table?
- What does the slash mean in a MySQL query?
- What is a smart pointer and when should I use it in C++?
- What does the restrict keyword mean in C++?
- What does the volatile keyword mean in C++?
- What does the explicit keyword mean in C++?
- While working with Java in eclipse I got a warning saying "dead code". What does it mean?
Advertisements