C program to convert an octal number into a binary number
belongs to collection: Number System Conversion Programs in C programming Language
All Answers
total answers (1)
belongs to collection: Number System Conversion Programs in C programming Language
total answers (1)
Here, we will read an octal number and convert it into a binary number and print the result on the console screen.
Program:
The source code to convert an octal number into a binary number is given below. The given program is compiled and executed using GCC compile on UBUNTU 18.04 OS successfully.
Output:
Explanation:
Here, we created a character array octalNum and integer variable i. Then we read the octal number and convert the number into a binary number and printed the result on the console screen.
need an explanation for this answer? contact us directly to get an explanation for this answer