C Program To Convert Decimal Number To Octal Number, using While Loop

Published: 24 January 2020
on channel: Technotip
15,250
222

http://technotip.com/7006/c-program-t...

Lets write a C program to convert a number from Decimal number system(base 10) to Octal number system(base 8), using while loop.

Expected Output for the Input
User Input:
Enter a decimal number
20

Output:
Octal equivalent of 20 is 24.

Explanation:
If user enters num = 20

We keep on dividing the number 20 by 8.

20 / 8 = 2, reminder 4.
02 / 8 = 0, reminder 2.

So Octal equivalent of decimal number 20 is 24.

C Programming Interview / Viva Q&A List
http://technotip.com/6378/c-programmi...

C Programming: Beginner To Advance To Expert
http://technotip.com/6086/c-programmi...


On this page of the site you can watch the video online C Program To Convert Decimal Number To Octal Number, using While Loop with a duration of hours minute second in good quality, which was uploaded by the user Technotip 24 January 2020, share the link with friends and acquaintances, this video has already been watched 15,250 times on youtube and it was liked by 222 viewers. Enjoy your viewing!