title: Problem inserting a 32-digit number into an array
body: <p>I am trying to write a C program to store a 32-bit number into an Array.<br/> For Example, the number: 11000001110010000000000000000000 <br/> In the array, arr[0] would be 1 as that is the first digit.
  <br/>However I am unable to get the desired output. This is my code:</p>
  <pre><code>#include&lt;stdio.h&gt;
  int main ()
  {
      int binarynumber;
      int arr[32];
      printf(&quot;Enter A binary Number:\n&quot;);
      scanf(&quot;%d&quot;, &amp;binarynumber);
      for (int i = 32; i &gt;= 0; i--) 
      {
          arr[i] = binarynumber % 10;
          binarynumber /= 10;
      }
      printf(&quot;The first digit is %d&quot;, arr[0]);
  }
  </code></pre>