VOOZH about

URL: https://www.geeksforgeeks.org/c/c-program-for-octal-to-decimal-conversion/

⇱ C Program For Octal to Decimal Conversion - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

C Program For Octal to Decimal Conversion

Last Updated : 8 Jun, 2023

The number system is one of the ways to represent numbers. Every number system has its own base or radix. For example, Binary, Octal, Decimal, and Hexadecimal Number systems are some of the number systems and are also used in microprocessor programming. These numbers are easy to convert from one system to another system. One can convert decimal to binary, decimal to hex, decimal to octal, and vice versa. 

👁 Octal to decimal conversion
 

Example:

Input: octal number = 123

Output: decimal number = 83

Using Format Specifier

Below is the C program to convert octal to a decimal using a format specifier:


Output

Enter an Octal number: 123
Decimal Representation is: 83

Without using pow() function

Below is the C program to convert octal to decimal without using pow() function:


Output
decimal number is 83

Using pow() Function

Below is the C program to convert octal to decimal using the pow() function:


Output
decimal number is 83

Standard method(Without Using Functions)

Below is the C program to convert octal to decimals using the standard method:

Comment