
- C Programming Tutorial
- C - Home
- C - Overview
- C - Environment Setup
- C - Program Structure
- C - Basic Syntax
- C - Data Types
- C - Variables
- C - Constants
- C - Storage Classes
- C - Operators
- C - Decision Making
- C - Loops
- C - Functions
- C - Scope Rules
- C - Arrays
- C - Pointers
- C - Strings
- C - Structures
- C - Unions
- C - Bit Fields
- C - Typedef
- C - Input & Output
- C - File I/O
- C - Preprocessors
- C - Header Files
- C - Type Casting
- C - Error Handling
- C - Recursion
- C - Variable Arguments
- C - Memory Management
- C - Command Line Arguments
- C Programming useful Resources
- C - Questions & Answers
- C - Quick Guide
- C - Useful Resources
- C - Discussion
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 Articles
- What does “dereferencing” a pointer mean in C/C++?
- What does the operation c=a+++b mean in C/C++?
- What do you mean by pointer to a constant in C language?
- What does “javascript:void(0)” mean?
- What does “unsigned” in MySQL mean and when to use it?
- What Does It Mean to Close a Project?
- What is a lunar eclipse? When does it occur?
- What does int argc, char *argv[] mean in C/C++?
- The ignition temperature of a fuel is 80°C". What does this mean?"
- What does the explicit keyword mean in C++?
- What does the restrict keyword mean in C++?
- What does the volatile keyword mean in C++?
- What is a Cybersecurity Mesh? What does It mean for Today's Enterprises?
- What does int argc, char *argv[] mean in C++?
- What does the [Flags] Enum Attribute mean in C#?

Advertisements