title: Converting from long to hex in C?
body: <p>I have this code</p>
  
  <pre><code>char binary[] = "0001001010000011";
  long number = strtol(binary, NULL, 16);
  printf("%x", number);
  </code></pre>
  
  <p>I want to convert the string into a hex number. the answer is 1283, but i am getting DF023BCF what am i doing wrong?</p>