title: Static char array return from function Provides incorrect answer
body: <p>according this code:</p>
  
  <pre><code>int main(){
      int x=1;
      int y=2;
      printf(" %s + %s = %s ", function(x) , function(y), function(x+y));
  }
  
  char* function(int num){
      static char B[20];
      sprintf(B,"%d",num);
      return B;
  }
  </code></pre>
  
  <p>The answer I got is: 1 + 1 = 1</p>
  
  <p>and the question is why?</p>
  
  <p>Why if I am separating the lines like this:</p>
  
  <pre><code>int main(){
      int x=1;
      int y=2;
      printf("%s +" function(x));
      printf(" %s =" function(y));
      printf(" %s"function(x+y));
  }
  </code></pre>
  
  <p>I got the correct answer as I expected ???</p>