title: Function definition with initialized arguments and Function call with less arguments
body: <p>I came across with a confusing question during an examination. Please help me to understand this concept. Code snippet is including here :  </p>
  
  <pre><code>void xyz(int a = 0, int b, int c = 0)
  {
      cout &lt;&lt; a &lt;&lt; b &lt;&lt; c;
  }
  </code></pre>
  
  <p>Now the question is which of the following calls are illegal?</p>
  
  <p><em>(Assume h and g are declared as integers)</em></p>
  
  <pre><code>(a) xyz();    (b) xyz(h,h);
  
  (c) xyz(h);    (d) xyz(g,g);
  </code></pre>
  
  <p><strong>Codes:</strong></p>
  
  <p><strong>(1)</strong> (a) and (c) are correct     <strong>(2)</strong> (b) and (d) are correct</p>
  
  <p><strong>(3)</strong> (a) and (b) are correct     <strong>(4)</strong> (b) and (c) are correct</p>
  
  <p><strong>I tried to compile the code in C++ and I got this error:</strong></p>
  
  <blockquote>
    <p>error:expected ';',',' or ')' before '=' token<br>
    void xyz (int a = 0, int b = 0, int c = 0)  </p>
  </blockquote>
  
  <p>Help me understand the concept.</p>