title: Printf and fprintf prints only first argument
body: <p>I have a problem I can't grasp with printf. It's the first time ever I have this problem, so I'm sure it's something naive, but no matter what, I can't solve it myself... maybe it's just because I'm tired: fprintf (and i've found it's true also for printf) correctly prints only the first argument, from the second it will print only "0" for numbers and "(null)" for strings</p>
  
  <p>Here's the relevant code: </p>
  
  <pre><code>#include &lt;math.h&gt;
  #include &lt;stdbool.h&gt;
  #include &lt;stdint.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  void printInputStream(MatePair* inputStream, char* leftFile, char* rightFile){
  
      MatePair* iterator = inputStream;
      FILE* outLeft = fopen(leftFile, "w");
      FILE* outRight = fopen(rightFile, "w");
  
  
      while (iterator-&gt;leftRow != MATEPAIR_STOP){
  
          fprintf(outLeft, "%d: \n", iterator-&gt;leftRow);
          fprintf(outLeft, "%s \n", iterator-&gt;leftDNA);
          fprintf(outLeft, "%d: %s \n", iterator-&gt;leftRow, iterator-&gt;leftDNA);
  
          iterator++;
      }
  
      fclose(outLeft);
      fclose(outRight);
  
  }
  </code></pre>
  
  <p>Here's the beginning of the output:</p>
  
  <pre><code>48: 
  NAATAGACCTATATCCTGTACCCAAACAGAAGACAGAGGATTAACCAAACTCTT 
  48: (null) 
  44: 
  NTAGCCATCTTAGACACATGAATATCTTGGGTCACAACTCATACCTCAACAAAA 
  44: (null) 
  40: 
  NAAAATAAGGGGTATACTCGCTTCGGGGCCCCATTTGGCCTCCAAAAGGGGGCG 
  40: (null) 
  36: 
  NTCTATCTTGCTCGAGAGAAAGGGTTGCCTTAGGGTTTTTTGGGGGGGGCTGTA 
  36: (null) 
  32: 
  NCTATAGAAATTTCCCATACCAACTAGACATTTATCTTCCTGTTTTTTTCCGCC 
  32: (null) 
  </code></pre>
  
  <p>As you can see I print every member of the array twice: once per argument and both arguments together. The data is fine, in fact with the first method it's all ok, with the second one only the first argument is printed.
  Any idea?
  Thanks in advance</p>