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

preview_player
Показать описание

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

C Programming: Beginner To Advance To Expert
Рекомендации по теме
Комментарии
Автор

thx man, im doing my proyect from my university and ur tutorial help me so much, i love u men, i do this in PYTHON

saidtadeosuarezfragozo
Автор

u deserve millions of subscribers and followers keep going... you help me a lot;

idpatel
Автор

good explanation... great job.. it helps me to solve this type of problem..thnx..

nbk
Автор

कृप्या थोड़ा धीरे समझाया करें । विध्यायर्थी को ऐसा समझकर पढ़ाया करें कि उसे कुछ नहीं आता है ।

Yatin-uvdp
welcome to shbcf.ru