![]() |
VOOZH | about |
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.
Example:
Input: octal number = 123
Output: decimal number = 83
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
Below is the C program to convert octal to decimal without using pow() function:
decimal number is 83
Below is the C program to convert octal to decimal using the pow() function:
decimal number is 83
Below is the C program to convert octal to decimals using the standard method: