title: Cannot return int array
body: <p>I want to use only studio.h library to convert from decimal number to binary number by using an array to store remainder but the result is not correct, maybe i have problem with memory allocation or return value is wrong, please help me to check it.
  Thank you so much!</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int  n = 0;
  int* DecimalToBinary(int number){
      int a[10];      
      while(number!=0){
          a[n++] = number%2;
          number/=2;
      }
      return a;
  }
  
  void main(){
  
      int *d1 = DecimalToBinary(5);
      int *d2 = DecimalToBinary(10);
  
      for(int i = n-1 ;i&gt;=0;i--)
          printf(" %d",d1[i]);
  
      printf("\n");
  
      for(int i = n-1 ;i&gt;=0;i--)
          printf(" %d",d2[i]);
  
  }
  </code></pre>