title: Function Declarations and Structure declarations in C
body: <pre><code>int f(struct r);
  struct r
  {
  int a;
  int b;
  };
  </code></pre>
  
  <p>The above snippet in a source file throws an error that </p>
  
  <pre><code>warning: its scope is only this definition or declaration,
  which is probably not what you want for the line int f(struct r) 
  </code></pre>
  
  <p>and the following snippet somewhere in the same source file but before the definition of function <code>f(struct r)</code></p>
  
  <pre><code>struct r emp;
  f(emp);
  </code></pre>
  
  <p>gives an error</p>
  
  <pre><code>error:type of formal parameter 1 is incomplete for the line f(emp)
  </code></pre>
  
  <p>but the same thing when the struct is replaced by <code>typedef</code>, there were no such such errors...</p>
  
  <p>Is this property to declare an argument in a function declaration before its use is specific to structure alone?</p>