C Program Convert Decimal to Octal

Prev Tutorial Next Tutorial

Convert Decimal to Octal Program in C

With the help of C Language you can convert any number from decimal to Octal. Decimal number have base 10 and Octal number have base 8.

Decimal Number System

The decimal numeral system (also called base-ten and occasionally called denary) has ten as its base, which, in decimal, is written 10, as is the base in every positional numeral system. It is the numerical base most widely used by modern civilizations

Octal Number System

The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Octal numerals can be made from binary numerals by grouping consecutive binary digits into groups of three (starting from the right).

Decimal to Octal Conversion Program in C


void main()
int no,rem[20],i=0,j;
printf("Please Enter any Decimal Number: ");
printf("Octal number is:");
for(j=i-1; j>=0; j--)
printf("  %d",rem[j]);


Please Enter any Decimal Number: 23
Octal number is: 2  7

Prev Tutorial Next Tutorial

Download Projects

Google Adsense Advertisements
Free Classified Site – Bedpage

Yahoo Advertisements