title: How to read and printout hexadecimalt address type of data from a trace file(.t file)
body: <p>I'm trying to read data from a trace file that has data, this is the first 5 lines from trace file:</p>
  <p>W 0x7fff6c5b7b80</p>
  <p>R 0x7fff6c5b7c48</p>
  <p>W 0x7fff6c5b7b88</p>
  <p>R 0x7fff6c5b7c20</p>
  <p>W 0x7fff6c5b7b90</p>
  <p>.</p>
  <p>.</p>
  <p>.</p>
  <p>Here is the part of the code I have for that, here I'm trying to read the first 5 lines and print them out:</p>
  <pre><code>#include &lt;string.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  
  int main ()
  {
          // line buffer
          FILE *fp;
          char type;
          unsigned int address;
          
          fp = fopen(&quot;XSBENCH.t&quot;, &quot;r&quot;);
          if(!fp)
          {
              printf(&quot;file not found\n&quot;);
          }
          
          for(int i = 0; i&lt;5; ++i)
          {
              fscanf(fp, &quot;%c %x&quot;, &amp;type, &amp;address);
              printf(&quot;%c %x \n&quot;, type, address);
          }        
          return 0;
  }
  </code></pre>
  <p>This is the exact output I get:</p>
  <pre><code>W 6c5b7b80
  
   6c5b7b80
  R 6c5b7c48
  
   6c5b7c48
  W 6c5b7b88
  
  </code></pre>
  <p>As you can tell, its not reading in the data properly, How can I fix this error?</p>