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