title: Read 64bit Hex value from a file in C
body: <p>I have a text file that looks like this:</p>
  
  <pre><code>0000000000000000    0000000000000000
  FFFFFFFFFFFFFFFF    FFFFFFFFFFFFFFFF
  3000000000000000    1000000000000001
  1111111111111111    1111111111111111
  0123456789ABCDEF    1111111111111111
  1111111111111111    0123456789ABCDEF
  0808080808080808    0000000000000000
  FEDCBA9876543210    0123456789ABCDEF
  7CA110454A1A6E57    01A1D6D039776742
  0131D9619DC1376E    5CD54CA83DEF57DA
  </code></pre>
  
  <p>What would be the best way to read these in using C? My first attempt tried to use <code>fscanf()</code> to read them into <code>int</code> variables, but these are 64-bit hex values, so the <code>int</code> type is too small to read them in completely and part of the values were truncated. </p>
  
  <p>My attempt:</p>
  
  <pre><code>while( fscanf(infile, "%x %x", &amp;key, &amp;plaintext) != EOF )
  {
      printf("%x\t\t%x\n", key, plaintext);
  
  }
  </code></pre>
  
  <p>Is there a type large enough to hold this in C? If not what are my other options for storage? Char arrays? </p>
  
  <p>Thanks</p>
  
  <p>Please note that I am using ANSI C, with GCC 4.5.2 (MinGW)</p>