Command Line Program for Decimal to Octal
Command Line Program to Convert Decimal to Octal
#include<stdio.h>
int main(int argc,char *argv[])
{
int n,s=0,b=1,r;
n=atoi(argv[1]);
int c=n;
while(c>0)
{
r=c%8;
s=s+r*b;
c=c/8;
b=b*10;
}
printf("%d",s);
getch();
}
One Subscription, For Everything
The new cool way of learning and upskilling -
One Subscription access everything
Get Access to PrepInsta Prime
from FAANG/IITs/TOP MNC's

PrepInstaPrime
Get over 200+ course One Subscription
Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.








Login/Signup to comment