Convert Decimal To Octal Number C Program

C Program To Convert Decimal To Octal Number

Learn How To Convert Decimal To Octal Number in C Programming Language. This C code for Decimal Number to Octal Conversion makes use of pow() function, While loop and For loop.

Decimal Number

A Decimal Number has a base 10 and includes digits the following digits: 0 1 2 3 4 5 6 7 8 9

Octal Number

An Octal Number has a base 8 and includes the following digits: 0 1 2 3 4 5 6 7

Method 1: C Program To Convert Decimal To Octal Number using While Loop

Method 2: C Program For Decimal Number To Octal Conversion using For Loop

Method 3: C Program To Convert Decimal Number To Octal Value using Functions


Output

C Program To Convert Decimal To Octal using For and While Loop

If you have any compilation error or doubts in this C Program For Decimal Value to Octal Number Conversion, let us know about it in the Comment Section below.

Recommended Programs
C Program To Convert Hexadecimal Number into Binary Value
C Program To Convert Hexadecimal Number into Decimal Value
C Program To Find Magic Integer
C Program To Convert Octal Number into Decimal Value
C Program To Convert Decimal Number into Hexadecimal Value
C Program To Convert Temperature From Fahrenheit to Celsius
C Program To Convert Decimal Number into Binary Value
C Program To Convert Binary Number into Decimal Value
C Program To Convert Decimal into Binary, Hexadecimal and Octal Values

Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

2 thoughts on “Convert Decimal To Octal Number C Program

  • August 28, 2016 at 5:29 pm
    Permalink

    Thanks. This is one of the easiest Number System Conversion Programs.

    Reply
  • September 13, 2016 at 11:04 am
    Permalink

    I think there is a problem with math.h header file. I am getting a compilation error when I convert decimal number to octal as per the above c program.

    Reply

Join The Discussion