C Program To Convert Decimal into Binary, Hexadecimal and Octal

 

C Program To Convert Decimal into Binary, Hexadecimal and Octal

Learn How To Convert Decimal into Binary, Hexadecimal and Octal Values in C Programming. This is the simplest C Program For Converting Decimal Values into Binary, Octal and Hexadecimal Numbers.

The given C Program uses If – Else Block Structure to solve the following problems:

 
  • Conversion of Decimal Number into Binary Value
  • Converting Decimal Numbers into Hexadecimal Number
  • Conversion of Decimal Integer into Octal Value

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

Binary Number

A Binary Value has a base 2 and includes only two digits: 0 1

Hexadecimal Number

A Hexadecimal Number has a base 16 and includes the following values: 0 1 2 3 4 5 6 7 8 9 A B C D E F

Octal Number

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

C Program To Convert Decimal into Binary, Hexadecimal and Octal Values using Functions

   

Output

C Program To Convert Decimal into Binary, Hexadecimal and Octal Values

If you have any compilation error or doubts in this C Program For Decimal Conversion into Binary, Hexadecimal and Octal Values, let us know about it in the Comment Section below.

Recommended Programs
C Program For Hexadecimal Number To Binary Conversion
C Program For Hexadecimal Number To Decimal Conversion
C Program For Decimal To Octal Conversion
C Program To Find Perfect Square Number
C Program For Octal To Decimal Conversion
C Program For Decimal To Hexadecimal Conversion
C Program To Find Prime Numbers
C Program For Decimal To Binary Conversion
C Program For Binary To Decimal Conversion

2 thoughts on “C Program To Convert Decimal into Binary, Hexadecimal and Octal

  1. Smita Patil

    I had never even imagined that Decimal to Binary, Hexadecimal and Octal conversion could br so easier. Thanks for providing the code.

    Reply
  2. Vir Das

    This is really amazing. This is like 3 in 1 code for Number system conversion.

    Reply

Let's Discuss