title: convert without using pre defined method
body: <p>I am implementing a function takes array  and return the its value , the code seem to be all good except for the converting part .</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int length=10;
  
  int function (char s){ 
  int n=0,i;
  for ( i = 0; i &lt; length; i++)
       {  
  printf(" %d = %x   %c \n ", i, s, );
  n = n * 10 + ;  
   s++;
       }
  
  return n;
  }
  
  int main(){
  char p[10];
  printf("enter string ");
  scanf("%s",p);
  printf("\n");
  
  int number;
  number =function(p);
  printf("  %d \n",&amp;number);
  return 0;}
  </code></pre>