title: Deshuffle text with C
body: <p>I wanted to get an opinion here. Would it be possible to write a C program that deshuffles a text file? What do I mean by that? Say I have the following data in a textfile:</p>
  
  <pre><code>1  X
  4  T
  3  Z
  2  L
  </code></pre>
  
  <p>And I wanted to deshuffle it and output another file as so:</p>
  
  <pre><code>1  X
  2  L
  3  Z
  4  T
  </code></pre>
  
  <p>Such that all of the data following the number is preserved with the actual index number. Do know that I have 40,500 shuffled entities, so that should probably be taken into account since that could take a long time if the program needs to loop through all of the entities for <em>each</em> entity...And I only used letters for representation. The actual data files don't have letters, but rather have <strong>floats</strong>. Sorry if this causes any confusion</p>
  
  <p>So, bottom line, would this be possible with C? And if so, could I get a hint at where to start? I could obviously input all of the textfile data into an array <code>dat[][]</code>, but how should I deshuffle it then?</p>
  
  <p>Thanks!
  Amit</p>