title: C-Compiler warning "Warning: too many arguments for format" how to fix?
body: <p>I am just starting C programming and am using Eclipse Mars environment and MinGW compiler. I encountered a problem when writing a program that adds two integers and outputs the sum.</p>
  
  <p>I received the "warning:too many arguments for format" dialog for the following statement:</p>
  
  <pre><code>printf("Sum of %d ", integer1," and %d", integer2," is: %d\n", sum);
  </code></pre>
  
  <p>Can anyone please explain why this is incorrect and how I may correct it?</p>
  
  <p>(the full program is given below):</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt; 
  
  int main(){
  
      int integer1; 
      int integer2;
  
      printf("Enter first integer \n"); 
      scanf("%d\n", &amp;integer1);
  
      printf("Enter second integer \n"); 
      scanf("%d", &amp;integer2); 
  
      int sum; 
      sum = integer1 + integer2;
  
      printf("Sum of %d ", integer1," and %d\a", integer2," is: %d\n", sum);
  
      system("pause");
  
      return 0;
  }
  </code></pre>
  
  <p>Can anyone explain how to rewrite the incorrect statement?</p>