source file name: Conv8.C 

void main()

{

int i,n;

int rem[15];;

//clrscr();

printf("\n enteu any Natural  number :\n");

scanf("%d",&n);

i=0;

while(n>0)

{

rem[i]=n%8;

n=n/8;

i++;

}


printf("\n Octal Conversion  :\n");

for(i=i-1;i>=0;i--)

printf(" %d ",rem[i]);


getch();

}

output: