This is a C program to find the octal equivalent of a decimal number. The first program does it without using a function and the second uses a function to do that.
Program #1: Find octal equivalent of a decimal number without using a function
Sample Output: Print octal equivalent of decimal number
Enter a decimal number: 25
0 in decimal = 31 in octal.
Program #2: Find octal equivalent of a decimal number using a function
Sample Output: Print octal equivalent of decimal number using function
Enter a decimal number: 58
58 in decimal = 72 in octal.
Share your code and queries in the comments.
Follow this link for more C programming examples.
Follow us on twitter.