C Program for the Conversion of Decimal to Octal Number

Decimal Numbers:
Decimal numbers has a radix 10. Decimal numbers use a combination of 0,1,2,3,4,5,6,7,8,9.
Octal Numbers:
Octal numbers has a radix of 8. Octal numbers use a combination of 0,1,2,3,4,5,6,7

Conversion from decimal number system to octal number system can be done by factorize the decimal number by 8.

Source Code:
            Decimal to Octal Conversion 
            Author: sourcecodesonline.blogspot.com
int main(void)  
{              long dec_no,oct_no=0,iter=1;  
            printf("\n\t\t\tDecimal to Octal Conversion");  
            printf("\n\tEnter the decimal number :");  
            printf("\nOctal equivalent is %ld",oct_no);  
Next Post »

Still not found what you are looking for? Try again here.