title: fprintf and ctime without passing \n from ctime
body: <p>I have an issue with inserting time in a text file. I use the following code and i get <code>|21,43,1,3,10,5| Wed Feb 01 20:42:32 2012</code> which is normal but what i WANT TO DO is place the time before the numbers for example like <code>Wed Feb 01 20:42:32 2012  |21,43,1,3,10,5|</code> However, i cant do so cause when i use the fprintf with ctime function before fprintf the numbers it recognizes the \n within ctime and so it changes line 1st and then printing the numbers. It goes like:</p>
  
  <pre><code>    Wed Feb 01 20:42:32 2012
      |21,43,1,3,10,5|
  </code></pre>
  
  <p>which is something that i dont want... How can i fprintf the time without swiching to the next line in the text??? Thanks in advance!</p>
  
  <pre><code>fprintf(file,"   |");
      for (i=0;i&lt;6;i++)
      {
          buffer[i]=(lucky_number=rand()%49+1);       //range 1-49
          for (j=0;j&lt;i;j++)                           
          {
              if (buffer[j]==lucky_number)
                  i--;
          }
          itoa (buffer[i],draw_No,10);
          fprintf(file,"%s",draw_No);
          if (i!=5)
              fprintf(file,",");
      }
      fprintf(file,"|     %s",ctime(&amp;t));
  </code></pre>