Command Line Program to Convert Binary to Octal
C Programming Language / Command Line Arguments
1076Program:
#include void main(int argc,char *argv[]) { long int n,r,c,b=1,s=0; n=atoi(argv[1]); c=n; while(c!=0) { r=c%10; s=s+r*b; c=c/10; b=b*2; } printf("%lo",s); getch(); }
Output:
1010 12
Explanation:
Nope
This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.
# C Tutorials
# JAVA Tutorials
# HTML Tutorials
# Computer Fundamental
# Data Structure
# DBMS Tutorials
SQL
# C# Language
# R Language
# PHP
# Python
# Vue JS