title: Why can't I specify the storage class for formal parameters of a function?
body: <p>When I do as below the code works fine :</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  void test( int a)
  {
   printf("a=%d\n",a);   
  }
  
  int main()
  {
      test(10);
      return 1;
  }
  </code></pre>
  
  <p>But when I do </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  void test( auto int a) // Or static int a Or extern int a
  {
   printf("a=%d\n",a);   
  }
  
  int main()
  {
      test(10);
      return 1;
  }
  </code></pre>
  
  <p>It generates an error,</p>
  
  <blockquote>
    <p>error: storage class specified for parameter 'a'</p>
  </blockquote>
  
  <p>Why is that error? What happens internally(memory management)?</p>
  
  <p>But it works fine without any error when I do:</p>
  
  <pre><code>void test( register int a)
  {
   printf("a=%d\n",a);   
  }
  </code></pre>
  
  <p>Why is that?</p>