title: Call function in C with less parameters
body: <p>By Mistake I called a function with less parameters that what it has in its prototype , the code compiled with no warnings, so i did the following experiment:</p>
  <p>compiled and ran the following code</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  void main()
  {
     printf(&quot;1 param  %d \n&quot;,f(1));
     printf(&quot;2 params %d \n&quot;,f(2,7));
     printf(&quot;3 params %d \n&quot;,f(7,8,9));
  }
  
  int f(int a, int b)
  {
    return (a+b);
  }
  </code></pre>
  <p>I compiled it using <code>gcc try.c</code>
  it compiled without warnings
  and the results were</p>
  <pre><code>1 param  -557760119 
  2 params 9 
  3 params 15
  </code></pre>
  <p>my question is how come the compiler compiled with no issues, even when i called f() function that gets two parameters either with one or three parameters
  Thanks,</p>