title: Can printf change its parameters?
body: <p><strong>EDIT:</strong>
  complete code with main is here <a href="http://codepad.org/79aLzj2H" rel="nofollow noreferrer">http://codepad.org/79aLzj2H</a></p>
  
  <p>and once again this is were the weird behavious is happening</p>
  
  <pre><code>for (i = 0; i&lt;tab_size; i++)
  {
    //CORRECT OUTPUT
    printf("%s\n", tableau[i].capitale);
    printf("%s\n", tableau[i].pays);
    printf("%s\n", tableau[i].commentaire);
    //WRONG OUTPUT
    //printf("%s --- %s --- %s |\n", tableau[i].capitale, tableau[i].pays, tableau[i].commentaire);
  }
  </code></pre>
  
  <hr>
  
  <hr>
  
  <p>I have an array of the following strcuture </p>
  
  <pre><code>struct T_info
  {
      char capitale[255];
      char pays[255];
      char commentaire[255];
  };
  
  struct T_info *tableau;
  </code></pre>
  
  <p>This is how the array is populated</p>
  
  <pre><code>int advance(FILE *f)
  {
    char c;
  
    c = getc(f);
    if(c == '\n')
      return 0;
  
    while(c != EOF &amp;&amp; (c == ' ' || c == '\t'))
    {
      c = getc(f);
    }
  
    return fseek(f, -1, SEEK_CUR);
  
  }
  
  int get_word(FILE *f, char * buffer)
  {
    char c;
    int count = 0;
    int space = 0;
  
    while((c = getc(f)) != EOF)
      {
        if (c == '\n')
        {
      buffer[count] = '\0';
      return -2;
        }
  
        if ((c == ' ' || c == '\t') &amp;&amp; space &lt; 1)
        {
      buffer[count] = c;
      count ++;
      space++;
        }
        else
        {
      if (c != ' ' &amp;&amp; c != '\t')
      {
        buffer[count] = c;
        count ++;
        space = 0;
      }       
      else /* more than one space*/
      {
       advance(f);
       break;
      }
        }
      }
  
     buffer[count] = '\0';
     if(c == EOF)
       return -1;
  
     return count;
  }
  
  void fill_table(FILE *f,struct T_info *tab)
  {
      int line = 0, column = 0;
  
      fseek(f, 0, SEEK_SET);
  
      char buffer[MAX_LINE];
      char c;
      int res;
  
      int i = 0;
      while((res = get_word(f, buffer)) != -999)
      {
        switch(column)
        {
          case 0:
          strcpy(tab[line].capitale, buffer); 
          column++;
            break;
          case 1:
            strcpy(tab[line].pays, buffer);
            column++;
            break;
          default:
            strcpy(tab[line].commentaire, buffer);    
            column++;
            break;
        }
        /*if I printf each one alone here, everything works ok*/
            //last word in line
        if (res == -2)
        {
          if (column == 2)
          {
            strcpy(tab[line].commentaire, " ");       
          }
  //wrong output here
          printf("%s -- %s -- %s\n", tab[line].capitale, tab[line].pays, tab[line].commentaire);
  
          column = 0;
            line++;
            continue;
        }
        column = column % 3;
  
        if (column == 0)
        {
          line++;
        }
  
        /*EOF reached*/
        if(res == -1)
          return;
  
      }
      return ;
  }
  </code></pre>
  
  <p><strong>Edit :</strong></p>
  
  <p>trying this </p>
  
  <pre><code>    printf("%s -- ", tab[line].capitale);
      printf("%s --", tab[line].pays);
      printf("%s --\n", tab[line].commentaire);
  </code></pre>
  
  <p>gives me as result </p>
  
  <pre><code> --  --abi  -- Emirats arabes unis
  </code></pre>
  
  <p>I expect to get </p>
  
  <pre><code>Abu Dhabi -- Emirats arabes unis --
  </code></pre>
  
  <p>Am I missing something?</p>