title: Remove leading zeros in c
body: <p>I want to Convert decimal into Binary but the output should be without leading zeros, so how do I remove the zeros? (The code works, it's written in C)</p>
  
  <pre><code>int* dec2bin(int, int[]);
  
  main(){
    int var=0;
    int n[16];
    printf("Number(&gt;=0, &lt;65535): ");
    scanf("%d", &amp;var);
    dec2bin(var, n);
    printf(" %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n", n[0], n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);
  }
  
  int* dec2bin(int N, int n[]){
    int count = 15;
    for(count=15; count &gt;=0; count--){
      n[count] = N%2;
      N=N/2;
    }
  }
  </code></pre>