title: Why macro and function having same name works only when macro is defined after function defintion?
body: <p>The below code works fine </p>
  
  <pre><code>void a()
  {
      printf("In fn");
  }
  
  #define a() printf("In macro")
  
  void main()
  {
      a();
  }
  </code></pre>
  
  <p>O/p In macro</p>
  
  <p>But look at this code when macro is defined before the funcn definition.(Throws compilation error)</p>
  
  <pre><code>#define a() printf("In macro")
  
  void a()
  {
      printf("In fn");
  }
  
  
  void main()
  {
      a();
  }
  </code></pre>
  
  <p>My question why it does work when macro definition is after function declaration and doesn't work when it is before it....</p>